Difference between revisions of "GetDistance - ObjectReference"

→‎Notes: Possible bug when calling this function on an actor when checking for an objectreference. Swap the calling object(object > actor) results in the correct value.
imported>Plplecuyer
 
imported>Goggle
(→‎Notes: Possible bug when calling this function on an actor when checking for an objectreference. Swap the calling object(object > actor) results in the correct value.)
 
Line 24: Line 24:
== Notes ==
== Notes ==
*If you are wanting to know when something is closer or farther then a specified distance from another one, you should instead use [[RegisterForDistanceLessThanEvent - ScriptObject|RegisterForDistanceLessThanEvent]] or [[RegisterForDistanceGreaterThanEvent - ScriptObject|RegisterForDistanceGreaterThanEvent]] instead of constantly checking the distance using this function manually which is less efficient.
*If you are wanting to know when something is closer or farther then a specified distance from another one, you should instead use [[RegisterForDistanceLessThanEvent - ScriptObject|RegisterForDistanceLessThanEvent]] or [[RegisterForDistanceGreaterThanEvent - ScriptObject|RegisterForDistanceGreaterThanEvent]] instead of constantly checking the distance using this function manually which is less efficient.
* Calling this function on an actor to check the distance of an objectreference will result in distance larger than expected. Where as calling said objectreference on an actor(even the same actor) will return a correct value. [https://forums.nexusmods.com/index.php?/topic/4844295-getdistance-bug/#entry42267360 Source]


== See Also ==
== See Also ==
Anonymous user