Garry's Mod Wiki


  Vector, Vector, number ENTITY:PhysicsSimulate( PhysObj phys, number deltaTime )


Called from the Entity's motion controller to simulate physics.

This will only be called after using Entity:StartMotionController on a scripted entity of anim type.

This hook can work on the CLIENT if you call Entity:StartMotionController and use Entity:AddToMotionController on the physics objects you want to control
Do not use functions such as PhysObj:EnableCollisions or PhysObj:EnableGravity in this hook as they're very likely to crash your game. You may want to use ENTITY:PhysicsUpdate instead.


1 PhysObj phys
The physics object of the entity.
2 number deltaTime
Time since the last call.


1 Vector
Angular force
2 Vector
Linear force
3 number
One of the SIM enum.