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

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

• 23
• 10
• 19
• 15
• 14