Method WorldObject:GetDistance [-] [+]
Returns the distance from this WorldObject to another WorldObject, or from this WorldObject to a point in 3d space.
The function takes into account the given object sizes. See also WorldObject:GetExactDistance, WorldObject:GetDistance2d
Synopsis
dist = WorldObject:GetDistance( obj )
dist = WorldObject:GetDistance( x, y, z )
Arguments
WorldObject obj
- See method description.
number x
The X-coordinate of the point.
Valid numbers: all decimal numbers.
number y
The Y-coordinate of the point.
Valid numbers: all decimal numbers.
number z
The Z-coordinate of the point.
Valid numbers: all decimal numbers.
Returns
number dist
The distance in yards.
Valid numbers: all decimal numbers.