GetAngle
Revision as of 19:23, 26 January 2007 by imported>Flyfightflea (Note about horseback)
Syntax:
GetAngle axis
Example:
GetAngle Z
Returns the current world rotation angle of the object on the selected axis (X, Y, or Z) in float.
Special Notes (relative to GetAngle called upon the player)
- Z angle returns a value from 0 to 360 depending on the player's current heading. Z angle is measured with south as 0 and increasing clockwise. Therefore, for trig functions to work properly with this function, you must use -angle + 90
- X angle returns a value (theorically) from -90 to 90. The true in-game range is -89 to 89, with -89 if the player is looking above himself, and 89 if player is looking at his feet.
- NOTE: You can rotate the camera when riding a horse without changing the actual direction the player's facing so GetAngle Z is kind of useless sometimes (like when using getLOS) if the player is on a horse.