Background for Fallout 4
Member of the ObjectReference script
floatfunctionGetHeadingAngle(ObjectReferenceakOther)Native

Description

Wiki Description

Gets the angle between this object's heading, and the direction the other object is in, in degrees. If you were to add this angle to this object's rotation around the z axis, and then set the rotation of this object to that - it would be facing the other object.

Documentation Comment

Gets the angle between this object's heading and the other object in degrees - in the range from -180 to 180


Parameters

  1. ObjectReferenceakOther

    CK Wiki Description

    The other object to get the angle to.


Examples

; Have the statue face the player
float zOffset = Statue.GetHeadingAngle(Game.GetPlayer())
Statue.SetAngle(Statue.GetAngleX(), Statue.GetAngleY(), Statue.GetAngleZ() + zOffset)

Auto-Generated Example

ObjectReference myObjectReference__akOther

float returnedValue = myObjectReference__toCallFunctionOn.GetHeadingAngle(myObjectReference__akOther)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.