Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
MathUtils::getAnglesFromVector Function
Syntax
C++
void getAnglesFromVector(const VectorF & vec, F32 & yawAng, F32 & pitchAng);

Returns yaw and pitch angles from a given vector. 

Angles are in RADIANS. 

Assumes north is (0.0, 1.0, 0.0), the degrees move upwards clockwise. 

The range of yaw is 0 - 2PI. The range of pitch is -PI/2 - PI/2. 

ASSUMES Z AXIS IS UP 

 

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!