new Spring(world, bodyA, bodyB, restLength, stiffness, damping, worldA, worldB, localA, localB)
Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.
Parameters
Name Type Argument Default Description world Phaser.Physics.P2 A reference to the P2 World. bodyA p2.Body First connected body. bodyB p2.Body Second connected body. restLength number <optional> 1 Rest length of the spring. A number > 0. stiffness