Six degrees of freedom (six DOF) constraint.

Hierarchy (view full)

Accessors

Methods

  • Modifies a spring of the constraint for the selected axis, after it was created.

    // axis
    [posX, posY, posZ, rotX, rotY, rotZ]

    Parameters

    • axis: number

      Axis number, zero-based.

    • settings: SpringSettings

      Spring settings.

    Returns void

    Example

    // change the spring settings used on X axis of rotation
    constraint.setLimitsSpringSettings(3, springSettings);
  • Changes the motor state, e.g. turn it on/off. Following aliases available:

    MOTOR_STATE_OFF
    
    MOTOR_STATE_VELOCITY
    
    MOTOR_STATE_POSITION
    
    • MOTOR_STATE_POSITION: Motor will drive to target position.
    • MOTOR_STATE_VELOCITY: Motor will drive to target velocity.

    See setLimitsSpringSettings for example.

    Parameters

    • axis: number

      Axis number, zero-based.

    • state: number

      Constants, representing the state.

    Returns void

  • Modifies translation limits of the constraint after it was created. In meters.

    Parameters

    • min: number

      Lower limit of the constraint.

    • max: number

      Upper limit of the constraint.

    Returns void