Sign in to follow this  
anchelito

Get yaw, pitch and roll from normalized vector

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
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

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