Garry's Mod Wiki

ENTITY:PhysicsSimulate

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

Description

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.

Arguments

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

Returns

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