# Class: LockConstraint

## Phaser .Physics .P2. LockConstraint

Physics LockConstraint Constructor

#### new LockConstraint(world, bodyA, bodyB, offset, angle, maxForce)

  Locks the relative position between two bodies.

  ##### 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.
  `offset` | Array | <optional> |  | The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].
  `angle` | number | <optional> | 0 | The angle of bodyB in bodyA's frame.
  `maxForce` | number | <optional> |  | The maximum force that should be applied to constrain the bodies.

  Source:
    - physics/p2/LockConstraint.js, line 20

### Members

#### game

  ##### Properties:

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

  Source:
    - physics/p2/LockConstraint.js, line 29

#### world

  ##### Properties:

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

  Source:
    - physics/p2/LockConstraint.js, line 34