Phaser API Documentation

  Version: 
getConstraintLength(constraint)

Description:

Returns the length of the given constraint, which is the distance between the two points.

Parameters:

name type description
constraint MatterJS.ConstraintType

The constraint to get the length from.

Returns:
Description:

The length of the constraint.

Type:
  • number
Since: 3.22.0