Entity.GetUp

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetUp( )
Description:
Returns the upward vector of the entity.
Returns: Vector
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GetUp]Entity.GetUp [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionWhen this Entity is used it will launch up, relative to the models rotation.
Used onNewerServer.png
Code
function ENT:Use(activator, caller)
 
	local phys = self:GetPhysicsObject()
	if not IsValid(phys) then return end
 
	local up = self:GetUp()
	phys:SetVelocity(up*2000)
 
end
OutputN/A

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox