I’m trying to convert rotation from world to local.
In details, there are 3 meshes, parentBox, childBox and anotherBox.
And parentBox is the parent of childBox.
What I want to do is,
- get center world rotation using parentBox’s world rotation and anotherBox’s world rotation
- convert center rotation from world to local (local to parentBox because I want to apply it to the childBox)
- apply the converted local rotation to childBox
I tried the same logic with positions, and it worked well.
But with rotations, it didn’t work like I wanted…
In the playground below, the position of the childBox will be changed after 1000 ms in the way I want.
And after 2000 ms, the rotation will be changed in the way I don’t intend…
I want the childBox have green front and red up…
Can somebody help me to solve this problem??
Thanks in advance