HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Box2D.MotorJointDef Class Referencesealed

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MotorJointDef()

Box2D.MotorJointDef.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 
)
inline

Construct a motor joint definition with the supplied values.

Parameters
bodyAThe first attached body
bodyBThe second attached body
linearOffsetPosition of bodyB minus the position of bodyA, in bodyA's frame
angularOffsetThe bodyB angle minus bodyA angle in radians
maxForceThe maximum motor force in newtons
maxTorqueThe maximum motor torque in newton-meters
correctionFactorPosition correction factor in the range [0,1]
collideConnectedSet this flag to true if the attached bodies should collide
userDataUser data

The documentation for this class was generated from the following file: