GetDistance
This function returns the distance between two entities in global space.
Syntax
- double GetDistance(Entity* entity)
- double GetDistance(const Vec3& position, const 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.