API Docs for: 0.4.0
Show:

PrismaticConstraint Class

Constraint that only allows bodies to move along a line, relative to each other. See this tutorial.

Constructor

PrismaticConstraint

(
  • bodyA
  • bodyB
  • options
)

Parameters:

  • bodyA Body
  • bodyB Body
  • options Object
    • maxForce Number

      Max force to be applied by the constraint

    • localAnchorA Array

      Body A's anchor point, defined in its own local frame.

    • localAnchorB Array

      Body B's anchor point, defined in its own local frame.

    • localAxisA Array

      An axis, defined in body A frame, that body B's anchor point may slide along.

Item Index

Methods

Methods

update

()

Update the constraint equations. Should be done if any of the bodies changed position, before solving.

Properties

localAnchorA

Array

localAnchorB

Array

localAxisA

Array