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

Method enableMotor

src/constraint/HingeJoint.cpp:106–113  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

104 * false otherwise
105 */
106void HingeJoint::enableMotor(bool isMotorEnabled) {
107
108 mWorld.mHingeJointsComponents.setIsMotorEnabled(mEntity, isMotorEnabled);
109 mWorld.mHingeJointsComponents.setImpulseMotor(mEntity, decimal(0.0));
110
111 // Wake up the two bodies of the joint
112 awakeBodies();
113}
114
115// Set the minimum angle limit
116/**

Callers

nothing calls this directly

Calls 2

setIsMotorEnabledMethod · 0.45
setImpulseMotorMethod · 0.45

Tested by

no test coverage detected