Player.GetCursorAimVector

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:GetCursorAimVector( )
Description:
Returns an aim vector based on the position of the player's cursor.
Returns: Vector dir
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.GetCursorAimVector]Player.GetCursorAimVector [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis will get a normalized vector from player one's cursor.
Used onNewerShared.png
Code
 
local vec = player.GetByID(1):GetCursorAimVector()
 
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox