GetDistance
This function returns the distance between two entities in global space.
Syntax
- number GetDistance(Entity entity)
- number GetDistance(Vec3 position, bool useshape = false)
Parameters
- entity: the entity to find the distance to.
- useshape: if set to true the entity's physics shape will be used to determine the shortest distance.
Returns
Returns the distance between this entity and the specified entity or position.