math docs
    Preparing search index...

    Function setHingeJoint

    • Sets a hinge constraint: the bone may only rotate in the plane perpendicular to rotationAxis, and within clockwise / anticlockwise radians of referenceAxis in that plane.

      referenceAxis is projected onto the hinge plane and normalized, so it need only be roughly perpendicular. Pass PI for both limits for a hinge that spins freely.

      Parameters

      • joint: Joint3

        the joint to configure

      • type: GLOBAL_HINGE | LOCAL_HINGE

        either JointType.GLOBAL_HINGE (axes in world space) or JointType.LOCAL_HINGE (axes relative to the previous bone)

      • rotationAxis: readonly [number, number, number]

        the hinge axis, assumed to be unit length

      • clockwise: number

        the clockwise limit in radians, clamped to [0, PI]

      • anticlockwise: number

        the anticlockwise limit in radians, clamped to [0, PI]

      • referenceAxis: readonly [number, number, number]

        the zero direction the limits are measured from

      Returns Joint3

      the joint