phaser - v4.0.0-rc.4
    Preparing search index...

    Class Constraint

    The Matter.Constraint module contains methods for creating and manipulating constraints. Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position). The stiffness of constraints can be modified to create springs or elastic.

    See the included usage examples.

    Constraint

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Returns the current length of the constraint. This is the distance between both of the constraint's end points. See constraint.length for the target rest length.

      Parameters

      Returns number

      the current length

      currentLength