Jump to content
  • Advertisement
Sign in to follow this  

Get yaw, pitch and roll from normalized vector

This topic is 3833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i do have a vector and i want to have the yaw, pitch and roll angles of that vector. i already found out, that my yaw is just asin(vec.x), but i don't know how to calculate the other values. thanks a lot for the help! greetings, anchelito

Share this post


Link to post
Share on other sites
Advertisement
A single vector has no roll (or rather, it can have any roll, since it won't change what it is).

Pitch is asin(y), if y is up. Once you have pitch, you have yaw as acos(x/r) where r = cos(pitch).

Share this post


Link to post
Share on other sites
thanks for the quick response.
actually i do have a line in space defined by two vectors. i imaginary translate both, so that the first vector is at the origin and i thought i just need the normalized translated second vector to calculate yaw, pitch and roll.

does a line have yaw, pitch and roll???

thanks!

Share this post


Link to post
Share on other sites
okay ... after i went out yesterday, i suddenly realized that it is the same with a line, there is also no roll, or at least the roll doesn't have a visual effect!

thanks for the help!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!