Difference between revisions of "GetAngleX - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Chesko
(The note about actors not being able to rotate about the X axis is incorrect; this should refer to the Y axis instead.)
imported>Verteiron
m (→‎Notes: Added notes about NPC head-tracking and Player's angle restrictions while mounted.)
 
Line 24: Line 24:


* The X angle for Actors is a value from -90 to 90.
* The X angle for Actors is a value from -90 to 90.
* The X angle for Actors capable of head-tracking generally follows their gaze: below zero is looking up, above zero is looking down.
* The X angle for the Player matches the camera's angle in first person mode, but follows gaze (like NPCs) in third person mode.
* While mounted, the Player's X angle is clamped to a value between -25 and 40, determined by the the camera's Z position.
* While mounted, the Player's mount will have an X angle between -90 and 90, determined by the camera's Z position.


== See Also ==
== See Also ==

Latest revision as of 15:45, 4 December 2013

Member of: ObjectReference Script

Gets this object's rotation around the x axis.

Syntax[edit | edit source]

float Function GetAngleX() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

This object's rotation around the x axis, in degrees.

Examples[edit | edit source]

Debug.Trace("We are rotated " + GetAngleX() + " degrees around the X axis")

Notes[edit | edit source]

  • The X angle for Actors is a value from -90 to 90.
  • The X angle for Actors capable of head-tracking generally follows their gaze: below zero is looking up, above zero is looking down.
  • The X angle for the Player matches the camera's angle in first person mode, but follows gaze (like NPCs) in third person mode.
  • While mounted, the Player's X angle is clamped to a value between -25 and 40, determined by the the camera's Z position.
  • While mounted, the Player's mount will have an X angle between -90 and 90, determined by the camera's Z position.

See Also[edit | edit source]