HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
|
A mouse joint is used to make a point on a body track a specified world point.
More...
Public Member Functions | |
MouseJointDef (Body bodyA, Body bodyB, Vec2 target, float hertz=0.0f, float dampingRatio=0.0f, float maxForce=0.0f, bool collideConnected=false, object? userData=null) | |
Construct a mouse joint definition with the supplied values. | |
MouseJointDef () | |
Construct a mouse joint definition with the default values. | |
Properties | |
ref Body | BodyA [get] |
The first attached body. This is assumed to be static. | |
ref Body | BodyB [get] |
The second attached body. | |
ref Vec2 | Target [get] |
The initial target point in world space. | |
ref float | Hertz [get] |
Stiffness in hertz. | |
ref float | DampingRatio [get] |
Damping ratio, non-dimensional. | |
ref float | MaxForce [get] |
Maximum force, typically in newtons. | |
bool | CollideConnected [get, set] |
Set this flag to true if the attached bodies should collide. | |
object? | UserData [get, set] |
User data. | |
A mouse joint is used to make a point on a body track a specified world point.
This a soft constraint and allows the constraint to stretch without applying huge forces. This also applies rotation constraint heuristic to improve control.
|
inline |
Construct a mouse joint definition with the supplied values.
bodyA | The first attached body |
bodyB | The second attached body |
target | The target point in world space |
hertz | Stiffness in hertz |
dampingRatio | Damping ratio, non-dimensional |
maxForce | Maximum force, typically in newtons |
collideConnected | Set this flag to true if the attached bodies should collide |
userData | User data |