HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
|
A motor joint is used to control the relative motion between two bodies
More...
Public Member Functions | |
MotorJointDef (Body bodyA, Body bodyB, Vec2 linearOffset, float angularOffset, float maxForce=0.0f, float maxTorque=0.0f, float correctionFactor=0.3f, bool collideConnected=false, object? userData=null) | |
Construct a motor joint definition with the supplied values. | |
MotorJointDef () | |
Construct a motor joint definition with the default values. | |
Properties | |
ref Body | BodyA [get] |
The first attached body. | |
ref Body | BodyB [get] |
The second attached body. | |
ref Vec2 | LinearOffset [get] |
Position of bodyB minus the position of bodyA, in bodyA's frame. | |
ref float | AngularOffset [get] |
The bodyB angle minus bodyA angle in radians. | |
ref float | MaxForce [get] |
The maximum motor force in newtons. | |
ref float | MaxTorque [get] |
The maximum motor torque in newton-meters. | |
ref float | CorrectionFactor [get] |
Position correction factor in the range [0,1]. | |
bool | CollideConnected [get, set] |
Set this flag to true if the attached bodies should collide. | |
object? | UserData [get, set] |
Use this to store application specific shape data. | |
A motor joint is used to control the relative motion between two bodies
A typical usage is to control the movement of a dynamic body with respect to the ground.
|
inline |
Construct a motor joint definition with the supplied values.
bodyA | The first attached body |
bodyB | The second attached body |
linearOffset | Position of bodyB minus the position of bodyA, in bodyA's frame |
angularOffset | The bodyB angle minus bodyA angle in radians |
maxForce | The maximum motor force in newtons |
maxTorque | The maximum motor torque in newton-meters |
correctionFactor | Position correction factor in the range [0,1] |
collideConnected | Set this flag to true if the attached bodies should collide |
userData | User data |