Class WheelConstraint

WheelConstraint

Hierarchy

Constructors

Properties

bodyA: Body

First body participating in the constraint.

bodyB: Body

Second body participating in the constraint.

collideConnected: boolean

Set to true if you want the connected bodies to collide.

Default

true
engineForce: number
equations: Equation[]

Equations to be solved in this constraint

localForwardVector: Vec2
localPosition: Vec2
steerValue: number
type: 2 | 1 | -1 | 3 | 4 | 5

The type of constraint. May be one of Constraint.DISTANCE, Constraint.GEAR, Constraint.LOCK, Constraint.PRISMATIC or Constraint.REVOLUTE.

DISTANCE: 1 = 1
GEAR: 2 = 2
LOCK: 3 = 3
OTHER: -1 = -1
PRISMATIC: 4 = 4
REVOLUTE: 5 = 5

Methods

  • Returns number

  • Parameters

    • force: number

    Returns void

  • Set max bias for this constraint.

    Parameters

    • maxBias: number

    Returns void

  • Set relaxation for this constraint.

    Parameters

    • relaxation: number

    Returns void

  • Parameters

    • force: number

    Returns void

  • Set stiffness for this constraint.

    Parameters

    • stiffness: number

    Returns void

  • Updates the internal constraint parameters before solve.

    Returns void