Sign in to follow this  
synap

Rotations

Recommended Posts

synap    122
Hello, I am writing a program that shows a single model. My question is regarding the rotation of entries within this scene graph. SceneGraph: mainTransform localTransform modelTransform What I want to do is to counter rotate a rotation transformation that is done by the mainTransform within the modelTransform. I want to do this so that my texttexture containing quads stay nicely readable. What kind of matrix manipulation should I apply to counter rotate the rotations that are executed by my mainTransform. I have the x,y,z rotation deltas as well and I tried doing a rotx(-x), roty(-y), rotz(-z) however this does not work. Thanks for any comments!!! Regards, Dennis

Share this post


Link to post
Share on other sites
Morrandir    304
Hi!

If you want something not to rotate, the correct way is not rotating. If you want some objects not to be affected by a rotation, put it above that rotation in the scenegraph.

Share this post


Link to post
Share on other sites
Alrecenk    400
If you want to negate a rotation not only do you have to use negative angles, but you also must apply those rotations in the opposite order: so if you rot(x) then rot(y) then rot(z) you must rot(-z), rot(-y), rot(-x). Not sure if that was what you were looking for, but it can be done that way.

edit: Actually, if you are doing another transformation after the one you are trying to negate then what I suggested probably will not work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this