Small World Engine API Reference - v0.78.00
    Preparing search index...

    Interface HingeJointOptions

    Configuration options for HingeJoint.

    interface HingeJointOptions {
        anchorA?: Vector3D;
        anchorB?: Vector3D;
        axisA?: Vector3D;
        axisB?: Vector3D;
        bodyA: Object3D;
        bodyB?: Object3D | null;
        breakForce?: number;
        collideConnected?: boolean;
        enableLimit?: boolean;
        enableMotor?: boolean;
        maxAngle?: number;
        maxMotorTorque?: number;
        minAngle?: number;
        motorSpeed?: number;
    }

    Hierarchy (View Summary)

    Index
    anchorA?: Vector3D

    Local-space anchor offset attached to bodyA (defaults to (0, 0, 0)).

    anchorB?: Vector3D

    Local-space anchor offset attached to bodyB, or world-space anchor if bodyB is null (defaults to (0, 0, 0)).

    axisA?: Vector3D

    Local hinge axis on bodyA (automatically normalized; defaults to Y-axis).

    axisB?: Vector3D

    Local hinge axis on bodyB (automatically normalized; defaults to Y-axis).

    bodyA: Object3D

    The primary Object3D entity constrained by this joint.

    bodyB?: Object3D | null

    The secondary Object3D entity, or null/undefined to anchor to a fixed point in world space.

    breakForce?: number

    Maximum impulse or force threshold before this joint breaks and disables itself (default: Infinity).

    collideConnected?: boolean

    Whether the two connected bodies are allowed to collide with each other (default: false).

    enableLimit?: boolean

    Enables the rotational angle limits.

    enableMotor?: boolean

    Enables the motor.

    maxAngle?: number

    Maximum allowed rotation angle, in radians.

    maxMotorTorque?: number

    Maximum torque the motor may apply, in Newton-meters.

    minAngle?: number

    Minimum allowed rotation angle, in radians.

    motorSpeed?: number

    Target angular velocity of the hinge, in radians per second.