Garry's Mod Wiki

Entity:EyeAngles

Entity:EyeAngles

  Angle Entity:EyeAngles()

Description

Returns the direction a player, npc or ragdoll is looking as a world-oriented angle.

This may return local angles in jeeps when used with Player:EnterVehicle.

Issue Tracker: 2620

Returns

1 Angle
Player's eye angle.

Example

Print the local player's angles.

print( LocalPlayer():EyeAngles() )
Output: When looking straight down, it might return Angle(89, -175.38, 0).

Example

Fix the issue with vehicles when used with Player:EnterVehicle.

print( LocalPlayer():GetVehicle():LocalToWorldAngles( LocalPlayer():EyeAngles() ) )

Special Pages


Wikis

?

Render Time: 22ms

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