Sign in to follow this  
Llorx

Rotation Matrix reset only one axis problem.

Recommended Posts

First of all, Hello to everyone! :P I have a problem, I have a rotation matrix that rotates in all 3 axes, and, in some point of the game, I receive a single axis absolute angle. Now I have a Rotation Matrix and a single angle, say, for example, 200 degrees on X axis. At this point, I want to reset my Rotation Matrix Y Axis to 200 degrees without modifying the degrees of X and Z axis but, I don't know how, because my Rotation Matrix already has an Y axis and, if I concatenate them, it will be more (or less) than 200 degrees. I've tried to get the Euler angles from the Matrix, then set Euler->Y to my desired degrees (Euler->Y = 200;) and then create a new Rotation Matrix with this Vector, but, I don't like it because in some positions, the angles received from conversion MatrixToEuler are not fiable. What can I do?

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