# Method WorldObject:GetExactDistance [-] [+]

Returns the distance from this WorldObject to another WorldObject, or from this WorldObject to a point in 3d space.

The function does not take into account the given object sizes, which means only the object coordinates are compared. See also WorldObject:GetDistance, WorldObject:GetDistance2d

## Synopsis

`dist = WorldObject:GetExactDistance( obj )`

`dist = WorldObject:GetExactDistance( 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.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine