Documentation
    Preparing search index...

    Interface HingeJointOptions

    How a HingeJoint is constructed (§28's example, field for field).

    interface HingeJointOptions {
        anchor?: Vector3Input;
        anchorA?: Vector3Input;
        anchorB?: Vector3Input;
        axis?: Vector3Input;
        bodyA: RigidBody;
        bodyB: RigidBody;
        breakForce?: number;
        breakTorque?: number;
        collisionEnabled?: boolean;
        limits?: JointLimits;
        motor?: AngularJointMotor;
    }

    Hierarchy (View Summary)

    Index
    anchor?: Vector3Input

    The attachment point in world space (§28's anchor), used for both bodies. Omitted means each body's own origin; overridden per body by JointOptions.anchorA / JointOptions.anchorB.

    anchorA?: Vector3Input

    World-space attachment point on bodyA, overriding anchor.

    anchorB?: Vector3Input

    World-space attachment point on bodyB, overriding anchor.

    Hinge axis in world space. Required in a "3d" world; a "2d" world defaults it to +Z, its only rotational freedom (§21).

    bodyA: RigidBody

    First constrained body (§28's bodyA). Must differ from bodyB.

    bodyB: RigidBody

    Second constrained body.

    breakForce?: number

    Break force in newtons (§28), or omitted for a joint that never breaks.

    breakTorque?: number

    Break torque in newton-metres (§28). See JointOptions.breakForce.

    collisionEnabled?: boolean

    Whether the two bodies still collide with each other (§28 "collision enable/disable"). false by default.

    limits?: JointLimits

    Angular travel in radians (§28 "limits"), or free rotation when omitted.

    Velocity motor about the axis (§28 "motors"), or none when omitted.