Documentation
    Preparing search index...

    Interface SliderJointOptions

    How a SliderJoint is constructed (§28).

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

    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.

    Slide axis in world space. Required in both dimensions — a slider with no direction has nothing to slide along — and must lie in the XY plane in a "2d" world (§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

    Travel in metres (§28 "limits"), or unlimited when omitted.

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