MotorJoint class

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.

Inheritance

Constructors

MotorJoint(MotorJointDef<Body, Body> def)

Properties

anchorA Vector2
Get the anchor point on bodyA in world coordinates.
no setteroverride
anchorB Vector2
Get the anchor point on bodyB in world coordinates.
no setteroverride
bodyA Body
getter/setter pairinherited
bodyB Body
getter/setter pairinherited
collideConnected bool
Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isActive bool
Short-cut function to determine if either body is inactive.
no setterinherited
islandFlag bool
getter/setter pairinherited
localAnchorA Vector2
finalinherited
localAnchorB Vector2
finalinherited
renderColor Color3i
Color used to render.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsBody(Body body) bool
Whether the body is connected to the joint
inherited
destructor() → void
Override to handle destruction of joint
inherited
getAngularOffset() double
getLinearOffset() Vector2
Get the target linear offset, in frame A, in meters. Do not modify.
getLinearOffsetOut(Vector2 out) → void
Get the target linear offset, in frame A, in meters.
getMaxForce() double
Get the maximum friction force in N.
getMaxTorque() double
Get the maximum friction torque in N*m.
initVelocityConstraints(SolverData data) → void
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
otherBody(Body body) Body
Get the other body than the argument in the joint
inherited
reactionForce(double invDt) Vector2
Get the reaction force on body2 at the joint anchor in Newtons.
override
reactionTorque(double invDt) double
Get the reaction torque on body2 in N*m.
override
render(DebugDraw debugDraw) → void
override
setAngularOffset(double angularOffset) → void
Set the target angular offset, in radians.
setLinearOffset(Vector2 linearOffset) → void
Set the target linear offset, in frame A, in meters.
setMaxForce(double force) → void
Set the maximum friction force in N.
setMaxTorque(double torque) → void
Set the maximum friction torque in N*m.
solvePositionConstraints(SolverData data) bool
This returns true if the position errors are within tolerance. Internal.
override
solveVelocityConstraints(SolverData data) → void
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited