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

    Interface FirstPersonControllerOptions

    Configuration for the FirstPersonController.

    interface FirstPersonControllerOptions {
        audio?: AudioSystem;
        collisionRadius?: number;
        enableCollision?: boolean;
        eyeHeight?: number;
        input?: InputInterface;
        moveSpeed?: number;
        retroTankControls?: boolean;
        rotationSpeed?: number;
        scene?: Scene;
    }
    Index
    audio?: AudioSystem

    Audio system reference. Required — no global fallback.

    collisionRadius?: number

    The radius of the collision sphere. Defaults to 0.7.

    enableCollision?: boolean

    Whether collisions are enabled. Requires a Scene reference.

    eyeHeight?: number

    The resting height of the camera above the floor. Defaults to 0.2 (legacy behavior).

    Input source. Required — no global fallback.

    moveSpeed?: number

    Movement speed in units per second. Defaults to 10.

    retroTankControls?: boolean

    Enable classic retro tank controls (turning with A/D) vs modern strafing. Defaults to true.

    rotationSpeed?: number

    Rotation speed in radians per second. Defaults to 2.0.

    scene?: Scene

    The scene to check for collisions.