G.EyePos

From GMod Wiki

Revision as of 21:39, 2 November 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax EyePos( )
Where is this used?
Description:
Return the client's view position. This is not the same as LocalPlayer( ):EyePos( ). This returns the position of the client's screen while LocalPlayer():EyePos() returns the eye position of your character (for third person).
Returns: Vector
Part of Library: Global Functions
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.EyePos]G.EyePos [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( ) + EyeVector( )*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