• Create Account

### #ActualRickard_Hermansson

Posted 05 January 2013 - 05:00 PM

Hello.

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.

### #5Rickard_Hermansson

Posted 05 January 2013 - 03:44 PM

Hello.

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.

### #4Rickard_Hermansson

Posted 05 January 2013 - 03:43 PM

Hello.

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 sucess.

### #3Rickard_Hermansson

Posted 05 January 2013 - 03:43 PM

Hello.

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 sucess.

### #2Rickard_Hermansson

Posted 05 January 2013 - 03:43 PM

Hello.

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 sucess.

### #1Rickard_Hermansson

Posted 05 January 2013 - 03:41 PM

Hello.

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 use the conjugate of the parents orientation, but without sucess.

PARTNERS