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