WorldGetClosestEntity Method (Entity, Vector3)

RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

Gets the closest entity to the specified position, within the specified radius.

Namespace:  Rage
Assembly:  RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.56.1131.11510)
Syntax

public static Entity GetClosestEntity(
	Entity[] entities,
	Vector3 position
)

Parameters

entities
Type: RageEntity
The array to pick the closest entity from.
position
Type: RageVector3
The position to get the closest entity to.

Return Value

Type: Entity
If the entities is non-empty, returns an instance of Entity representing the closest entity; otherwise, returns null.
See Also

Reference