Rotation constraint components for local position.

Note

This component currently decomposes the rotation into euler angles, which might create glimbal lock. In addition, the yaw/pitch/roll order is currently not exposed.

Hierarchy

  • Component
    • RotationConstraint

Properties

lockX: boolean = false
lockY: boolean = false
lockZ: boolean = false
max: Float32Array

Maximum allowed rotation, in degrees, in local space.

Note

To disable constraint on an axis, use a value larger than max. e.g.,

// Disable constraint for the x axis
constraint.min[0] = 1;
constraint.max[0] = -1;
min: Float32Array

Minimum allowed rotation, in degrees, in local space.

Note

To disable constraint on an axis, use a value larger than max. e.g.,

// Disable constraint for the x axis
constraint.min[0] = 1;
constraint.max[0] = -1;
TypeName: string = 'rotation-constraint'

Methods