UnitDistanceSquared
Jump to navigation
Jump to search
This function is restricted.
|
Returns the squared distance to a unit in your group.
distanceSquared, checkedDistance = UnitDistanceSquared(unit)
Arguments
- unit
- string : UnitId - The unit id of a player in your group.
Returns
- distanceSquared
- number - the squared distance to that unit
- checkedDistance
- boolean - true if the distance result is valid, false otherwise (eg. unit not found or not in your group)
Patch changes
Patch 7.1.0 (2016-10-25): Returns nil while inside a restricted area (instance/battleground/arena).