createGearConstraint(bodyA, bodyB, angle, ratio) → {Phaser.Physics.P2.GearConstraint}
Creates a constraint that tries to keep the distance between two bodies constant.
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.  |  ||
angle |  number |  <optional> |  0 | The relative angle  |  
ratio |  number |  <optional> |  1 | The gear ratio.  |  
Returns
The constraint
- Source code: physics/p2/World.js (Line 1007)
 
Please login to continue.