Player:GetEyeTrace
Description
Returns a table with information of what the player is looking at.
The results of this function are cached clientside every frame.
Uses util.GetPlayerTrace internally and is therefore bound by its limits.
See also Player:GetEyeTraceNoCursor.
Returns
Example
Prints the entity the player is looking at.
Output:
Entity [0][worldspawn]
in console, if you aim at world.