Documentation
    Preparing search index...

    Interface SpringJointOptions

    How a SpringJoint is constructed (§28 "spring", "damping").

    interface SpringJointOptions {
        anchor?: Vector3Input;
        anchorA?: Vector3Input;
        anchorB?: Vector3Input;
        bodyA: RigidBody;
        bodyB: RigidBody;
        breakForce?: number;
        breakTorque?: number;
        collisionEnabled?: boolean;
        damping?: number;
        restLength: number;
        stiffness: number;
    }

    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.

    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.

    damping?: number

    Damping in newton-seconds per metre. Must be >= 0; 0 by default.

    restLength: number

    Distance at which the spring is at rest, in metres. Must be >= 0.

    stiffness: number

    Spring constant in newtons per metre. Must be > 0.