ENTITY:PhysicsSimulate

From Garry's Mod
Jump to: navigation, search
 ENTITY:PhysicsSimulate( )

Contents

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.

NOTE This hook can work on the CLIENT if you call Entity:StartMotionController and use Entity:AddToMotionController on the physics objects you want to control
WARNING 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

PhysObj phys

The physics object of the entity.

Arguments

number deltaTime

Time since the last call.

Returns

Vector

Angular force

Returns

Vector

Linear force

Returns

number

One of the SIM_ Enums.
Personal tools
Navigation