Garry's Mod Wiki

Entity:StartMotionController

  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.

Only works on a scripted Entity of anim type.