#

API Docs for: 0.6.0
Show: Inherited Protected Private Deprecated

# HingeConstraint Class

Extends Constraint
Defined in: `src/constraints/HingeConstraint.js:9`

Hinge constraint. Tries to keep the local body axes equal.

## Constructor

### `HingeConstraint`

(

- `bodyA`
- `bodyB`
- `[options]`

)

Defined in `src/constraints/HingeConstraint.js:9`

#### Parameters:

- `bodyA` RigidBody
- `bodyB` RigidBody
- `[options]` Object optional
  - `[pivotA]` Vec3 optional

    A point defined locally in bodyA. This defines the offset of axisA.

  - `[axisA]` Vec3 optional

    an axis that bodyA can rotate around.

  - `[pivotB]` Vec3 optional
  - `[axisB]` Vec3 optional
  - `[maxForce=1e6]` Number optional

- Index
- Methods
- Properties

## Item Index

### Methods

- disableMotor
- enableMotor
- update

### Properties

- bodyA
- bodyB
- collideConnected
- equations
- id

## Methods

### `disableMotor`

()

Defined in `src/constraints/HingeConstraint.js:94`

### `enableMotor`

()

Defined in `src/constraints/HingeConstraint.js:84`

### `update`

()

Inherited from Constraint: `src/constraints/Constraint.js:58`

## Properties

### `bodyA`

Body

Inherited from Constraint: `src/constraints/Constraint.js:26`

### `bodyB`

Body

Inherited from Constraint: `src/constraints/Constraint.js:31`

### `collideConnected`

Boolean

Inherited from Constraint: `src/constraints/Constraint.js:41`

Set to true if you want the bodies to collide when they are connected.

### `equations`

Array

Inherited from Constraint: `src/constraints/Constraint.js:19`

Equations to be solved in this constraint

### `id`

Number

Inherited from Constraint: `src/constraints/Constraint.js:36`