math docs
    Preparing search index...

    Enumeration JointType

    How a joint may rotate relative to the bone before it.

    A JointType.BALL joint with a rotor of PI is unconstrained, which is the default, so there is no separate "no constraint" type.

    Index
    BALL: 0

    Rotates freely within a cone of rotor radians about the previous bone's direction.

    GLOBAL_HINGE: 1

    Rotates only in the plane perpendicular to rotationAxis, which is in world space.

    LOCAL_HINGE: 2

    Rotates only in the plane perpendicular to rotationAxis, which is fixed in the previous bone's frame.

    That frame comes from mat3.fromDirection, so local +Z is the previous bone's own direction and local +X and +Y are perpendicular to it. (fabrik2 uses +Y for the same idea, so a rig ported from 2D needs its axes rotated.) The frame's roll about the bone is arbitrary and flips near world -Z, so a hinge whose parent swings through there will pop - hinge about a GLOBAL_HINGE axis you rebuild from your own frame if the parent turns freely.