Notifications
Clear all
[Closed] Rotation problem
Feb 20, 2006 10:20 am
hi,
i’m trying to rotate object by 10 degrees in X,Y and Z at the same time. after first rotation, everything is OK, but after second is not. thanks for your help, here’s the code
a = eulerangles 10 10 10
(eulerAngles 10 10 10)
rotate $ a
OK
inverse $.rotation as eulerangles
(eulerAngles 10 10 10) -- this is OK
rotate $ a
OK
inverse $.rotation as eulerangles
(eulerAngles 22.0451 17.9134 22.0451) -- this is what ??
4 Replies
Feb 20, 2006 10:20 am
You’re probably encountering translation rounding error between eulerAngles and quaternions. Have you tried your code applying the rotations as quaternions?
Feb 20, 2006 10:20 am
I think, the result you are getting is the multiplication of the two rotations. If you want to have your selected object with a given rotation you have to use:
$.rotation.controller.value = a
Using “rotate $ a” you add the given rotation to the one the object already has…
But maybe I haven’t understood what you wanted to do… which result were you expecting Max to return you??
/Lui