# Class: RevoluteConstraint

## Phaser .Physics .P2. RevoluteConstraint

Physics RevoluteConstraint Constructor

#### new RevoluteConstraint(world, bodyA, pivotA, bodyB, pivotB, maxForce)

  Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

  ##### Parameters:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `world` | Phaser.Physics.P2 |  |  | A reference to the P2 World.
  `bodyA` | p2.Body |  |  | First connected body.
  `pivotA` | Float32Array |  |  | The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].
  `bodyB` | p2.Body |  |  | Second connected body.
  `pivotB` | Float32Array |  |  | The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].
  `maxForce` | number | <optional> | 0 | The maximum force that should be applied to constrain the bodies.

  Source:
    - physics/p2/RevoluteConstraint.js, line 21

### Members

#### game

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `game` | Phaser.Game | Local reference to game.

  Source:
    - physics/p2/RevoluteConstraint.js, line 28

#### world

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `world` | Phaser.Physics.P2 | Local reference to P2 World.

  Source:
    - physics/p2/RevoluteConstraint.js, line 33