Entity/StartMotionController

From Garry's Mod
Jump to: navigation, search
 Entity:StartMotionController( )

Description

Starts a motion controller in the physics engine tied to this entity's PhysObj, which enables the use of ENTITY:PhysicsSimulate.

The motion controller can later be destroyed via Entity:StopMotionController.

Motion controllers are used internally to control other Entities' PhysObjects, such as the Gravity Gun, +use pickup and the Physics Gun.

This function should be called every time you recreate the Entity's PhysObj. Or alternatively you should call Entity:AddToMotionController on the new PhysObj.

Also see Entity:AddToMotionController and Entity:RemoveFromMotionController.

NOTE

Only works on a scripted Entity of anim type.

Personal tools
Navigation