;Assume a view from above:
;
; C
; |
; |
; |
; , A-------> (A's heading [A is facing this direction])
; , ' `
; , ' `
; D `
; `
; `
; B
float fAngle = A.GetHeadingAngle(B) ;fAngle will equal 45.0
float gAngle = A.GetHeadingAngle(C) ;gAngle will equal -90.0
float hAngle = A.GetHeadingAngle(D) ;hAngle will equal 150.0 (approx)
; Have the statue face the player
float zOffset = Statue.GetHeadingAngle(Game.GetPlayer())
Statue.SetAngle(Statue.GetAngleX(), Statue.GetAngleY(), Statue.GetAngleZ() + zOffset)
Returns the angle between this object's current heading, and the direction from this object toward a target object, in degrees. If you were to add the returned angle to this object's current rotation around the z axis, it would then be facing the target object.
Documentation Comment
Gets the angle between this object's heading and the other object in degrees - in the range from -180 to 180
;Assume a view from above:;; C; |; |; |; , A-------> (A's heading [A is facing this direction]); , ' `; , ' `; D `; `; `; Bfloat fAngle = A.GetHeadingAngle(B);fAngle will equal 45.0float gAngle = A.GetHeadingAngle(C);gAngle will equal -90.0float hAngle = A.GetHeadingAngle(D);hAngle will equal 150.0 (approx)
; Have the statue face the playerfloat zOffset = Statue.GetHeadingAngle(Game.GetPlayer())Statue.SetAngle(Statue.GetAngleX(), Statue.GetAngleY(), Statue.GetAngleZ() + zOffset)