Documentation
    Preparing search index...

    Interface SweptCharacterControllerOptions

    Options for SweptCharacterController (§12, §24, §30).

    interface SweptCharacterControllerOptions {
        collisionGroups?: number;
        collisionMask?: number;
        gravity?: number;
        grounded?: boolean;
        groundSnapDistance?: number;
        halfHeight: number;
        jumpSpeed?: number;
        maxFallSpeed?: number;
        maxSlides?: number;
        moveSpeed?: number;
        pushDynamics?: boolean;
        pushImpulseScale?: number;
        pushMass?: number;
        radius: number;
        skinWidth?: number;
        slopeLimit?: number;
        stepHeight?: number;
        verticalVelocity?: number;
        world?: PhysicsWorld;
        yaw?: number;
    }
    Index
    collisionGroups?: number

    §30 bit set the character's own casts belong to. Defaults to every bit.

    collisionMask?: number

    §30 bit set the character's casts may hit. Defaults to every bit.

    gravity?: number

    Vertical acceleration in m/s² while airborne. Default −9.81.

    grounded?: boolean

    Whether the character starts grounded. Default false.

    groundSnapDistance?: number

    How far a grounded character looks down for its ground, in metres. Finite and >= 0. Default DEFAULT_GROUND_SNAP_DISTANCE.

    halfHeight: number

    Half the length of the capsule's cylindrical section, in metres — §24's own parameterization, so the total height is 2 · (halfHeight + radius) and the axis is +Y. Finite and > 0.

    jumpSpeed?: number

    Upward speed SweptCharacterController.jump imparts, in m/s. Default 4.

    maxFallSpeed?: number

    Terminal downward speed in m/s, or Infinity (the default) for none.

    maxSlides?: number

    Collide-and-slide iteration budget for one step. An integer >= 1. Default DEFAULT_MAX_SLIDES.

    moveSpeed?: number

    Speed a full move intent produces, in m/s. Default 1.

    pushDynamics?: boolean

    Whether a horizontal slide against a "dynamic" body imparts an impulse. Default true. false restores the pre-PH-11c no-push behaviour.

    pushImpulseScale?: number

    Dimensionless gain on the push impulse. Finite and >= 0. Default DEFAULT_PUSH_IMPULSE_SCALE.

    pushMass?: number

    Mass, in kilograms, used only for the PH-11c reduced-mass push against a dynamic hit. The controller is kinematic and is not a solver body. Finite and > 0. Default DEFAULT_PUSH_MASS.

    radius: number

    Radius of the swept capsule, in metres (§24). Finite and > 0.

    skinWidth?: number

    Gap kept between the capsule and every surface, in metres. Finite, > 0, and less than radius. Default DEFAULT_SKIN_WIDTH.

    slopeLimit?: number

    Steepest ground the character stands on, in radians from horizontal (§7a). 0 <= slopeLimit < π/2. Default DEFAULT_SLOPE_LIMIT.

    stepHeight?: number

    Largest rise the character climbs without jumping, in metres. Finite and >= 0; 0 disables step-up. Default DEFAULT_STEP_HEIGHT.

    verticalVelocity?: number

    Initial vertical velocity in m/s — what §79 restores. Default 0.

    world?: PhysicsWorld

    The collision world every sweep is cast against (§30). Optional so a component restored from a §79 document can be re-bound afterwards, exactly as a reloaded RigidBody is registered afterwards; a controller with no world writes nothing.

    Must be a "3d" world — see the module note on "2d".

    yaw?: number

    Initial heading in radians (§7a). Default 0.