Skip to content

Interface: MouseJointDef

Mouse joint definition. This requires a world target point, tuning parameters, and the time step.

Extends

Properties

bodyA

bodyA: Body

The first attached body.

Inherited from

JointDef.bodyA


bodyB

bodyB: Body

The second attached body.

Inherited from

JointDef.bodyB


collideConnected?

optional collideConnected: boolean

Set this flag to true if the attached bodies should collide.

Inherited from

JointDef.collideConnected


dampingRatio?

optional dampingRatio: number

[dampingRatio = 0.7] The damping ratio. 0 = no damping, 1 = critical damping.

Inherited from

MouseJointOpt.dampingRatio


frequencyHz?

optional frequencyHz: number

[frequencyHz = 5.0] The response speed.

Inherited from

MouseJointOpt.frequencyHz


maxForce?

optional maxForce: number

[maxForce = 0.0] The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).

Inherited from

MouseJointOpt.maxForce


style?

optional style: Style

Styling for dev-tools.

Inherited from

JointDef.style


target

target: Vec2Value

The initial world target point. This is assumed to coincide with the body anchor initially.


userData?

optional userData: any

Use this to attach application specific data to your joints.

Inherited from

JointDef.userData