QAngle

From Valve Developer Community
Revision as of 16:15, 17 March 2009 by TomEdwards (talk | contribs) (fixing Hammer angles)
Jump to navigation Jump to search
Description Name Value Image Code
An angular world
orientation in degrees.
Pitch Y Roll pitch yaw.gif QAngle(y, z, x)
Yaw Z
Roll X

Converting to a vector

Angles chosen in Hammer will arrive as vectors, but in a bad format. Fix them up with this code:

Vector vecAbsDir;
QAngle angPushDir = QAngle(m_vecPushDir.x, m_vecPushDir.y, m_vecPushDir.z);
AngleVectors(angPushDir, &vecAbsDir);