I have two game objects.
The final world transform of each object is calculated by concatenating the objects local transform with that parents transform, like so:
world = Matrix.Scaling(scale) * Matrix.RotationQuaternion(orientation) * Matrix.Translation(position) world *= parent.world;Now, to my problem.
the scenario is:
1. I pitch objectA 90 deg around the world x-axis (position is (0,0,0))
2. I move objectB a few units along the x-axis (position is (3,0,0))
3. I set the objectA as the parent of objectB
Now I decide to yaw objectB in world space, the operation would be (using quaternions):
objectB.orientation = qYaw * objectB.orientation;BbjectB will rotate around the world z-axis since it is parallel to the parents y-axis.
I need to account for the parent's oerientaton when performing rotations in world space, and I have no idéa how
to do that. I have tried to use the conjugate of the parents orientation, but without success.
Edited by Rickard_Hermansson, 05 January 2013 - 05:00 PM.