Garry's Mod Wiki

Player:GetUseEntity

Player:GetUseEntity

  Entity Player:GetUseEntity()

Description

Returns the entity the player would use if they would press their +use keybind.

Because entity physics objects usually do not exist on the client, the client's use entity will resolve to whatever the crosshair is placed on within a little less than 72 units of the player's eye position. This differs from the entity returned by the server, which has fully physical use checking. See util.TraceHull.

Issue tracker: 5027

Returns

1 Entity ent
The entity that would be used or NULL.

Special Pages


Wikis

?

Render Time: 20ms

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