Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DistanceConstraint

Constrains two bodies to be at a constant distance from each others center of mass.

Hierarchy

Index

Constructors

constructor

Properties

bodyA

bodyA: Body

Body A.

bodyB

bodyB: Body

Body B.

collideConnected

collideConnected: boolean

Set to false if you don't want the bodies to collide when they are connected.

distance

distance: number

The distance to keep. If undefined, it will be set to the current distance between bodyA and bodyB

equations

equations: Equation[]

Equations to be solved in this constraint.

Methods

disable

  • disable(): void

enable

  • enable(): void

update

  • update(): void