ENT.PhysicsUpdate

From GMod Wiki

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