Chains all bodies in the given composite together using constraints.
name | type | arguments | description |
---|---|---|---|
composite | MatterJS.CompositeType |
The composite in which all bodies will be chained together sequentially. |
|
xOffsetA | number |
The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. |
|
yOffsetA | number |
The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. |
|
xOffsetB | number |
The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. |
|
yOffsetB | number |
The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. |
|
options | Phaser.Types.Physics.Matter.MatterConstraintConfig | <optional> |
An optional Constraint configuration object that is used to set initial Constraint properties on creation. |
The original composite that was passed to this method.