Is it possible to do rotations taking axis of the world and not of the object?
I need to do some rotations of an object, but after the first rotation, I can't do other rotations like i want.
If it's not possible to do rotation on the axis of the world, my second option is to reset the axis after the first rotation. Is there some function for this?
I can't use object.eulerOrder
because it changes the orientation of my object when I set object.eulerOrder="YZX"
after some rotations.
Here's a small variation. Tested with r56.
The three last lines are just to resync the params
(position,rotation)
from the matrix... I wonder if there is a more efficient way to do that...Updated answer from @Neil (tested on
r98
)@acarlon Your answer might just have ended a week of frustration. I've refined your function a bit. Here are my variations. I hope this saves someone else the 20+ hours I spent trying to figure this out.
This works beautifully in r91. Hope it helps.
Somewhere around r59 this gets a lot easier (rotate around x):
THREE - r107