Garry's Mod Wiki


  Entity Player:GetUseEntity()


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


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