• Create Account

### #ActualgbMike

Posted 05 May 2012 - 01:19 AM

Minor hiccup. It seems that calculating a transformation matrix (only using rotations in the x, y, and z for now) is calculating all the rotations, relative to the world's x,y and z. How would I apply this to get the rotations, relative to the object's current rotation? (i.e. if I performed a 90 degree rotation on the z axis to an upright soda bottle, and then applied a rotation in the y, using the matrix based calculations, the bottle will spin, where as I would like it to roll )

Is there a different set of rotation matrices for this, or simply a different way to apply them?

Please let me know if I am not being clear enough.

EDIT:

Never mind, aswered my own question. I had the rotations correct, but I failed to apply them in the correct order to match my glRotate calls. All is well now.

### #2gbMike

Posted 04 May 2012 - 10:40 PM

Minor hiccup. It seems that calculating a transformation matrix (only using rotations in the x, y, and z for now) is calculating all the rotations, relative to the world's x,y and z. How would I apply this to get the rotations, relative to the object's current rotation? (i.e. if I performed a 90 degree rotation on the z axis to an upright soda bottle, and then applied a rotation in the y, using the matrix based calculations, the bottle will spin, where as I would like it to roll )

Is there a different set of rotation matrices for this, or simply a different way to apply them?

Please let me know if I am not being clear enough.

### #1gbMike

Posted 04 May 2012 - 10:39 PM

Minor hiccup. It seems that calculating a transformation matrix (only using rotations in the x, y, and z for now) is calculating all the rotations, relative to the world's x,y and z. How would I apply this to get the rotations, relative to the object's current rotation? (i.e. if I performed a 90 degree rotation on the z axis to an upright soda bottle, and then applied a rotation in the y, using the matrix based calculations, the can will spin, where as I would like it to roll )

Is there a different set of rotation matrices for this, or simply a different way to apply them?

Please let me know if I am not being clear enough.

PARTNERS