ENT.PhysicsUpdate

From GMod Wiki

Revision as of 08:18, 11 October 2010 by Jcw87 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NamePhysicsUpdate
SyntaxENT:PhysicsUpdate( Physobj phys )
DescriptionCalled when the physics is updated on the SEnt. (Probably called every frame that the entity is awake.)
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=ENT.PhysicsUpdate]ENT.PhysicsUpdate [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPropels the entity forward like a rocket.
Used onNewerServer.png
Code
function ENT:PhysicsUpdate( phys )
	phys:AddVelocity( self:GetForward() * 9999 );
end
OutputMakes the entity propel forward like a rocket.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox