Garry's Mod Wiki

Garry's Mod Wiki

  Player:SetEyeAngles( Angle angle )

Description

Sets the local angle of the player's view (may rotate body too if angular difference is large)

Arguments

1 Angle angle
Angle to set the view to

Example

Points a player at Vector( 0, 0, 0 )

local lplayer = LocalPlayer() // Or any player local vec1 = Vector( 0, 0, 0 ) -- Where we're looking at local vec2 = lplayer:GetShootPos() -- The player's eye pos lplayer:SetEyeAngles( ( vec1 - vec2 ):Angle() ) -- Sets to the angle between the two vectors
Output: Local player will look at 0,0,0

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...