Entity.EyePos

From GMod Wiki

Revision as of 02:51, 1 February 2011 by Wizard of Ass (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:EyePos( )
Description:

In the case of a ragdoll, returns two vectors. The first vector is the position of the left eye, and the second is the position of the right eye.

In the case of a player, this returns the position which the player is looking at.
Returns: Vector [, Vector ]
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.EyePos]Entity.EyePos [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets the the position of where you are looking at of yourself.
Used onNewerClient.png
Code
print("I am currently looking at " .. tostring(LocalPlayer():EyePos()) .. "!")
OutputI am currently looking at 215, -126, 5!
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox