Class: Phaser.Physics.P2.GearConstraint
Constructor
new GearConstraint(world, bodyA, bodyB, angle, ratio)
Connects two bodies at given offset points, letting them rotate relative to each other around this point.
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. | ||
angle | number | <optional> | 0 | The relative angle |
ratio | number | <optional> | 1 | The gear ratio. |
- Source code: physics/p2/GearConstraint.js (Line 18)
Public Properties
- Source code: physics/p2/GearConstraint.js (Line 26)
- Source code: physics/p2/GearConstraint.js (Line 31)
game : Phaser.Game
Local reference to game.
world : Phaser.Physics.P2
Local reference to P2 World.
© 2016 Richard Davey, Photon Storm Ltd.
Licensed under the MIT License.
http://phaser.io/docs/2.6.2/Phaser.Physics.P2.GearConstraint.html