G.Vector
From GMod Wiki
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)