Box2D 3.2.0
A 2D physics engine for games
Loading...
Searching...
No Matches

Functions for the mover joint. More...

Data Structures

struct  b2MoverJointDef
 A mover joint is used to move a dynamic character mover through velocity commands. More...

Functions

b2JointId b2CreateMoverJoint (b2WorldId worldId, const b2MoverJointDef *def)
 Create a mover joint.
void b2MoverJoint_SetLinearVelocity (b2JointId jointId, b2Vec2 velocity)
 Set the desired relative linear velocity in meters per second.
b2Vec2 b2MoverJoint_GetLinearVelocity (b2JointId jointId)
 Get the desired relative linear velocity in meters per second.
void b2MoverJoint_SetMaxVelocityForce (b2JointId jointId, b2Vec2 maxForce)
 Set the joint maximum force, usually in newtons.
b2Vec2 b2MoverJoint_GetMaxVelocityForce (b2JointId jointId)
 Get the joint maximum force, usually in newtons.
b2MoverJointDef b2DefaultMoverJointDef (void)
 Use this to initialize your joint definition.

Detailed Description

Functions for the mover joint.

The mover joint is designed for a dynamic character mover.

Warning
Experimental. The mover joint may change in future versions.

Data Structure Documentation

◆ b2MoverJointDef

struct b2MoverJointDef

A mover joint is used to move a dynamic character mover through velocity commands.

The x and y directions are handled separately. Does not affect rotation.

Data Fields
b2JointDef base Base joint definition.
int internalValue Used internally to detect a valid definition. DO NOT SET.
b2Vec2 linearVelocity The desired linear velocity.
b2Vec2 maxVelocityForce The maximum motor force in newtons.

Function Documentation

◆ b2CreateMoverJoint()

b2JointId b2CreateMoverJoint ( b2WorldId worldId,
const b2MoverJointDef * def )

Create a mover joint.

See also
b2MoverJointDef for details