Functions for the motor joint. More...

Data Structures | |
| struct | b3MotorJointDef |
| A motor joint is used to control the relative position and velocity between two bodies. More... | |
Functions | |
| b3JointId | b3CreateMotorJoint (b3WorldId worldId, const b3MotorJointDef *def) |
| Create a motor joint. | |
| void | b3MotorJoint_SetLinearVelocity (b3JointId jointId, b3Vec3 velocity) |
| Set the desired relative linear velocity in meters per second. | |
| b3Vec3 | b3MotorJoint_GetLinearVelocity (b3JointId jointId) |
| Get the desired relative linear velocity in meters per second. | |
| void | b3MotorJoint_SetAngularVelocity (b3JointId jointId, b3Vec3 velocity) |
| Set the desired relative angular velocity in radians per second. | |
| b3Vec3 | b3MotorJoint_GetAngularVelocity (b3JointId jointId) |
| Get the desired relative angular velocity in radians per second. | |
| void | b3MotorJoint_SetMaxVelocityForce (b3JointId jointId, float maxForce) |
| Set the motor joint maximum force, usually in newtons. | |
| float | b3MotorJoint_GetMaxVelocityForce (b3JointId jointId) |
| Get the motor joint maximum force, usually in newtons. | |
| void | b3MotorJoint_SetMaxVelocityTorque (b3JointId jointId, float maxTorque) |
| Set the motor joint maximum torque, usually in newton-meters. | |
| float | b3MotorJoint_GetMaxVelocityTorque (b3JointId jointId) |
| Get the motor joint maximum torque, usually in newton-meters. | |
| void | b3MotorJoint_SetLinearHertz (b3JointId jointId, float hertz) |
| Set the spring linear hertz stiffness. | |
| float | b3MotorJoint_GetLinearHertz (b3JointId jointId) |
| Get the spring linear hertz stiffness. | |
| void | b3MotorJoint_SetLinearDampingRatio (b3JointId jointId, float damping) |
| Set the spring linear damping ratio. Use 1.0 for critical damping. | |
| float | b3MotorJoint_GetLinearDampingRatio (b3JointId jointId) |
| Get the spring linear damping ratio. | |
| void | b3MotorJoint_SetAngularHertz (b3JointId jointId, float hertz) |
| Set the spring angular hertz stiffness. | |
| float | b3MotorJoint_GetAngularHertz (b3JointId jointId) |
| Get the spring angular hertz stiffness. | |
| void | b3MotorJoint_SetAngularDampingRatio (b3JointId jointId, float damping) |
| Set the spring angular damping ratio. Use 1.0 for critical damping. | |
| float | b3MotorJoint_GetAngularDampingRatio (b3JointId jointId) |
| Get the spring angular damping ratio. | |
| void | b3MotorJoint_SetMaxSpringForce (b3JointId jointId, float maxForce) |
| Set the maximum spring force in newtons. | |
| float | b3MotorJoint_GetMaxSpringForce (b3JointId jointId) |
| Get the maximum spring force in newtons. | |
| void | b3MotorJoint_SetMaxSpringTorque (b3JointId jointId, float maxTorque) |
| Set the maximum spring torque in newtons * meters. | |
| float | b3MotorJoint_GetMaxSpringTorque (b3JointId jointId) |
| Get the maximum spring torque in newtons * meters. | |
| b3MotorJointDef | b3DefaultMotorJointDef (void) |
| Use this to initialize your joint definition. | |
Functions for the motor joint.
The motor joint is designed to control the movement of a body while still being responsive to collisions. A spring controls the position and rotation. A velocity motor can be used to control velocity and allows for friction in top-down games. Both types of control can be combined. For example, you can have a spring with friction. Position and velocity control have force and torque limits.
| struct b3MotorJointDef |
A motor joint is used to control the relative position and velocity between two bodies.

| Data Fields | ||
|---|---|---|
| float | angularDampingRatio | Angular spring damping ratio. |
| float | angularHertz | Angular spring hertz for position control. |
| b3Vec3 | angularVelocity | The desired angular velocity. |
| b3JointDef | base | Base joint definition. |
| float | linearDampingRatio | Linear spring damping ratio. |
| float | linearHertz | Linear spring hertz for position control. |
| b3Vec3 | linearVelocity | The desired linear velocity. |
| float | maxSpringForce | Maximum spring force in newtons. |
| float | maxSpringTorque | Maximum spring torque in newton-meters. |
| float | maxVelocityForce | The maximum motor force in newtons. |
| float | maxVelocityTorque | The maximum motor torque in newton-meters. |
| b3JointId b3CreateMotorJoint | ( | b3WorldId | worldId, |
| const b3MotorJointDef * | def ) |
Create a motor joint.