G.Vector
From GMod Wiki
Revision as of 19:11, 11 November 2009 by Crazy Quebecer (Talk | contribs)
Function | |
Syntax |
G.Vector( Float x, Float y, Float z ) Where is this used? |
Description: | |
Create a vector | |
Returns: | Vector |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.Vector]G.Vector [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Add a vector to the player's position. |
---|---|
Used on | |
Code | ply:SetPos( ply:GetPos() + Vector(0,0,100) ) |
Output | The player is teleported 100 units upwards. |
Additional Notes
- vector_origin is a build-in constant vector variable. It is equivalent to Vector(0,0,0)
- vector_up is a build-in constant vector variable. It is equivalent to Vector(0,0,1)