Garry's Mod Wiki

Entity:NearestPoint

Entity:NearestPoint

  Vector Entity:NearestPoint( Vector position )

Description

Performs a Ray-Orientated Bounding Box intersection from the given position to the origin of the OBBox with the entity and returns the hit position on the OBBox.

This relies on the entity having a collision mesh (not a physics object) and will be affected by SOLID_NONE

Arguments

1 Vector position
The vector to start the intersection from.

Returns

1 Vector
The nearest hit point of the entity's bounding box in world coordinates.

Special Pages


Wikis

?

Render Time: 22ms

DB GetPage 5
Generate Html 2
SaveChanges (1) 6
Render Body 0
Render Sidebar 6