MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / enableMotor

Method enableMotor

src/constraint/SliderJoint.cpp:116–123  ·  view source on GitHub ↗

Enable/Disable the motor of the joint * @param isMotorEnabled True if you want to enable the joint motor and false * otherwise */

Source from the content-addressed store, hash-verified

114 * otherwise
115 */
116void SliderJoint::enableMotor(bool isMotorEnabled) {
117
118 mWorld.mSliderJointsComponents.setIsMotorEnabled(mEntity, isMotorEnabled);
119 mWorld.mSliderJointsComponents.setImpulseMotor(mEntity, decimal(0.0));
120
121 // Wake up the two bodies of the joint
122 awakeBodies();
123}
124
125// Return the current translation value of the joint
126/**

Callers

nothing calls this directly

Calls 2

setIsMotorEnabledMethod · 0.45
setImpulseMotorMethod · 0.45

Tested by

no test coverage detected