Difference between revisions of "GetHeadingAngle"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Geckbot
m (Robot: Automated text replacement (-Link to TES4 Construction Set Wiki +{{Incomplete}}\n\nLink to TES4 Construction Set Wiki))
imported>Geckbot
m (Robot: Automated text replacement (-\[\[Category:(.*?)\(GECK 1.0\)\]\] +Category:\1(GECK 1.1)))
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Incomplete}}
{{Function
|CSWikiPage = GetHeadingAngle
|origin = GECK1
|summary = Returns the angle between the calling reference and the specified object in a range from -180 to 180 degrees.
|name = GetHeadingAngle
|returnVal = -180 to 180
|returnType = float
|referenceType = [Object]
|arguments =
  {{FunctionArgument
  |Name = ObjectRef
  |Type = ref
  }}
|example = Player.GetHeadingAngle StrangeStatue
}}
==Notes==
*Do not confuse this function with GetAngle Z, which returns the heading angle of an object relative to the world.
*The direction the calling reference is facing is considered 0 degrees.
*Angles measured clockwise from 0 are positive, while angles measured counter-clockwise from 0 are negative.
*In the example above, if the player is facing north and the object StrangeStatue is due west of the player, the returned value would be -90.
*When you add this value to the calling references's current heading angle (Z angle), he will face the specified ObjectRef:
 
  set angle to Player.GetAngle Z + Player.GetHeadingAngle StrangeStatue
  Player.SetAngle Z angle


Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/GetHeadingAngle GetHeadingAngle].
==See Also==
*[[GetAngle]]
*[[SetAngle]]
*[[Rotate]]
*[[GetPos]]
*[[SetPos]]


[[Category:Functions]]
[[Category: Functions]]
[[Category: Functions (GECK 1.1)]]
[[Category: Condition Functions]]
[[Category: Condition Functions (GECK 1.1)]]
[[Category: Movement Functions]]
[[Category: Movement Functions (GECK 1.1)]]

Latest revision as of 12:22, 15 August 2009

< [[::Category:Functions|Category:Functions]]

Link to TES4 Construction Set Wiki: GetHeadingAngle.

A function included in the GECK version 1.1.0.36.

Description

Returns the angle between the calling reference and the specified object in a range from -180 to 180 degrees.

Syntax

[help]
(-180 to 180:float) [Object].GetHeadingAngle ObjectRef:ref

Example

Player.GetHeadingAngle StrangeStatue

Notes

  • Do not confuse this function with GetAngle Z, which returns the heading angle of an object relative to the world.
  • The direction the calling reference is facing is considered 0 degrees.
  • Angles measured clockwise from 0 are positive, while angles measured counter-clockwise from 0 are negative.
  • In the example above, if the player is facing north and the object StrangeStatue is due west of the player, the returned value would be -90.
  • When you add this value to the calling references's current heading angle (Z angle), he will face the specified ObjectRef:
  set angle to Player.GetAngle Z + Player.GetHeadingAngle StrangeStatue
  Player.SetAngle Z angle 

See Also