QAngle: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| Solokiller (talk | contribs) m (spam revert) | TomEdwards (talk | contribs)   (fixing Hammer angles) | ||
| Line 10: | Line 10: | ||
| | Roll || X | | Roll || X | ||
| |} | |} | ||
| == Converting to a vector == | |||
| Angles chosen in Hammer will arrive as [[vector]]s, but in a bad format. Fix them up with this code: | |||
| <source lang=cpp>Vector vecAbsDir; | |||
| QAngle angPushDir = QAngle(m_vecPushDir.x, m_vecPushDir.y, m_vecPushDir.z); | |||
| AngleVectors(angPushDir, &vecAbsDir);</source> | |||
| [[Category:Glossary]] | [[Category:Glossary]] | ||
| [[Category:Helpers]] | [[Category:Helpers]] | ||
| [[Category:Level Design]] | [[Category:Level Design]] | ||
Revision as of 16:15, 17 March 2009
| Description | Name | Value | Image | Code | 
|---|---|---|---|---|
| An angular world orientation in degrees. | Pitch | Y |   | 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);