Phaser.Physics.P2. GearConstraint

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 - physics/p2/GearConstraint.js, line 18

Members

game :Phaser.Game

Local reference to game.

Source - physics/p2/GearConstraint.js, line 26

world :Phaser.Physics.P2

Local reference to P2 World.

Source - physics/p2/GearConstraint.js, line 31
Phaser Copyright © 2012-2016 Photon Storm Ltd.
Documentation generated by JSDoc 3.4.0 on Fri Aug 26 2016 01:16:16 GMT+0100 (BST) using the DocStrap template.