1.I have this cube.
2.I parented a cone on top of it in runtime.
3.Enlarge the object during runtime (press one)
4.Then I change the orientation of the object 45 degrees.(space bar)
The child object (cone) will be displaced on oval like shape if i do a rotation.
I know we can do a ‘Scale and Rotation to OBdata’ during edit mode to correct the rotation before runtime. (Ctrl + A)
But is there anyhow to correct the translation by using python during the runtime?
If you’re using matrices (haven’t looked at the file), your object could be skewed unless you have a scientific understanding on how matrices work.
This is because rotation in 3D is more than just X, Y, and Z, if you want just the XYZ (or Euler angle) to mess with, then use the Mathutils module to convert the orientation to Euler values, change it, convert it back to a matrix, then set the orientation to the new value. (you would likely use variables to store the orientation of each axis and to help convert the values to Eulers and back)