LimitRotationConstraint - Verge3D User Manual - Soft8Soft
Description: Learn how to use LimitRotationConstraint in your interactive 3D apps made with Verge3D

Constraint →

# LimitRotationConstraint

A constraint which limits the constrained object's rotation in its parent's space.

To influence some object, push a LimitRotationConstraint instance into the Object3D.constraints array.

## Constructor

### LimitRotationConstraint()

The constructor takes no arguments.

## Properties

See the base Constraint class for inherited properties.

### # .axis : String

The axis to limit the rotation around. Can be one of the `"X"`, `"Y"`, `"Z"`. Default is `"Y"`.

### # .isLimitRotationConstraint : Boolean

Read-only flag to check if a given object is of type LimitRotationConstraint.

### # .max : Float

The maximum allowed euler angle around the corresponding axis to limit the object's rotation. Default is `2π`.

### # .min : Float

The minimum allowed euler angle around the corresponding axis to limit the object's rotation. Default is `0`.

### # .type : String

The constraint's type. Equals to `"LimitRotationConstraint"`.

## Methods

See the base Constraint class for inherited methods.

## Puzzles

You can use the limit transform puzzle to apply LimitRotationConstraint in a visual manner.

## Source

For more info on how to obtain the source code of this module see this page.