constraint.Motor
Entity, Entity constraint.Motor( Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos1, Vector localPos2, number friction, number torque, number forcetime, number nocollide = 0, number toggle = false, Player player = NULL, number forcelimit = 0, number key_fwd = nil, number key_bwd = nil, number direction = 1, Vector localAxis = nil )
Description
Creates a motor constraint, a player controllable constraint.Axis.
Arguments
4 number bone2
PhysObj number of second entity to constrain to. (0 for non-ragdolls). Must be different from
bone1
.
9 number forcetime
Automatic shut-off after this time has passed. A value of 0 means to stay on forever or until deactivated.
12 Player player = NULL
The player that will control the motor. Used to to call numpad.OnDown and numpad.OnUp.
Returns
1 Entity
The created constraint. (phys_torque) Will return
false
if the constraint could not be created.2 Entity
The created axis constraint. (phys_hinge) Will return
nil
if the constraint could not be created.