1,482
edits
imported>Egocarib (Tried to tweak this to be a bit clearer, and added a visual aid.) |
m (Convert source tags to syntaxhighlight) |
||
| Line 6: | Line 6: | ||
== Syntax == | == Syntax == | ||
< | <syntaxhighlight lang="papyrus"> | ||
float Function GetHeadingAngle(ObjectReference akOther) native | float Function GetHeadingAngle(ObjectReference akOther) native | ||
</ | </syntaxhighlight> | ||
== Parameters == | == Parameters == | ||
| Line 17: | Line 17: | ||
== Examples == | == Examples == | ||
< | <syntaxhighlight lang="papyrus"> | ||
;Assume a view from above: | ;Assume a view from above: | ||
; | ; | ||
| Line 35: | Line 35: | ||
float gAngle = A.GetHeadingAngle(C) ;gAngle will equal -90.0 | float gAngle = A.GetHeadingAngle(C) ;gAngle will equal -90.0 | ||
float hAngle = A.GetHeadingAngle(D) ;hAngle will equal 150.0 (approx) | float hAngle = A.GetHeadingAngle(D) ;hAngle will equal 150.0 (approx) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="papyrus"> | ||
; Have the statue face the player | ; Have the statue face the player | ||
float zOffset = Statue.GetHeadingAngle(Game.GetPlayer()) | float zOffset = Statue.GetHeadingAngle(Game.GetPlayer()) | ||
Statue.SetAngle(Statue.GetAngleX(), Statue.GetAngleY(), Statue.GetAngleZ() + zOffset) | Statue.SetAngle(Statue.GetAngleX(), Statue.GetAngleY(), Statue.GetAngleZ() + zOffset) | ||
</ | </syntaxhighlight> | ||
== See Also == | == See Also == | ||