G.EyeAngles

From GMod Wiki

Revision as of 20:59, 3 November 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax EyeAngles( )
Where is this used?
Description:
Return the client's view orientation as an angle. This is not the same as LocalPlayer( ):EyeAngles( ). This returns the angles of the client's screen while LocalPlayer():EyeAngles() returns the eye angles of your character (for third person).
Returns: Angle
Part of Library: Global Functions
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.EyeAngles]G.EyeAngles [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example code draws an explosion in front of the player's eyes.
Used onNewerClient.png
Code
local SpawnPos = EyePos( ) + EyeAngles( ):Forward( )*100
 
local fx = EffectData( )
fx:SetOrigin( SpawnPos )
util.Effect( "Explosion", fx )
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox