I have yaw, pitch and roll from an object and i need to transform it into vectorDir and vectorUp. Someone an idea of how to do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would convert the Euler angles (yaw, pitch and roll) into a rotation matrix
M. Follow this answer for example.It is not 100% clear what you need but you it is one of the followings.
You get vectorDir by multiplying the column vector
x=[1,0,0]by eitherMor its transpose.You get vectorUp by multiplying the column vector
z=[0,0,1]by eitherMor its transpose.Note. Euler angles are evil, they screw up the stability of your app, see for example
Strange behavior with android orientation sensor,
Reducing wiimote pitch/roll variations.
They are not useful for interpolation either.