Get yaw, pitch and roll from normalized vector

Started by
2 comments, last by anchelito 16 years, 4 months ago
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
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).
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!
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!

This topic is closed to new replies.

Advertisement