ObjectDistance
Returns the distance between two WowGameObject
's.
ObjectDistance(--[[(1)]]objectReference, --[[(1)]]objectReference) : distance | false
- See Object Reference for more information on possible values.
Example
Get the distance between the player and the target.
local distance = ObjectDistance('player', 'target')
Do something with the distance between the player and all objects.
for i, object in ipairs(Objects()) do local distance = ObjectDistance('player', object) -- do something with distanceend