createSpring(bodyA, bodyB, restLength, stiffness, damping, worldA, worldB, localA, localB) → {Phaser.Physics.P2.Spring}
Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.
Parameters
Name Type Argument Default Description bodyA Phaser.Sprite | Phaser.Physics.P2.Body | p2.Body First connected body. bodyB Phaser.Sprite | Phaser.Physics.P2.Body | p2.Body Second connected body. restLength number <optional> 1 Rest len