Garry's Mod Wiki

properties.GetHovered

  Entity properties.GetHovered( Vector pos, Vector aimVec )

Description

Returns an entity player is hovering over with their cursor.

Arguments

1 Vector pos
Eye position of local player, Entity:EyePos
2 Vector aimVec
Aim vector of local player, Player:GetAimVector

Returns

1 Entity
The hovered entity