SDK JS
    Preparing search index...

    Interface FirstPersonNavOptions

    Construction options for createFirstPersonNav.

    interface FirstPersonNavOptions {
        clampToSurface?: boolean;
        climbMaxM?: number;
        engageDurationMs?: number;
        heightM?: number;
        lookAheadS?: number;
        lookDegPerPx?: number;
        manageMaxZoom?: boolean;
        mode?: FirstPersonNavMode;
        scrollAdjustsHeight?: boolean;
        speedMps?: number;
    }
    Index

    Properties

    clampToSurface?: boolean

    Keep the eye pinned at heightM above the surface (true, the default) or let it HOLD ITS ALTITUDE while moving — free flight, the eye flies level over rising ground. Walk mode always clamps (you cannot walk off the surface); this is the fly-mode lock. See FirstPersonNavController.setClampToSurface.

    climbMaxM?: number

    Walk mode: the surface rise (m) the eye will still step/ramp over, measured across the look-ahead probe. Default 1.5.

    NOTE it is a rise over the SPEED-SCALED probe distance (max(2, speedMps × lookAheadS)), so the slope it actually permits is atan(climbMaxM / probe) — 1.5 m reads as ≈37° at 2 m/s but only ≈14° at the default 8 m/s. FirstPersonNavController.getClimbSlopeDeg returns that live number (the widget shows it beside the slider).

    engageDurationMs?: number

    Ease-in duration when entering first person, ms. Default 900.

    heightM?: number

    Eye height above the surface, metres. Clamped to ≥ MIN_NAV_HEIGHT_M (2 ft); no maximum. Default 1.8 (eye level).

    lookAheadS?: number

    Walk mode: how far ahead the obstacle probe looks, seconds of travel (min 2 m). Default 0.75.

    lookDegPerPx?: number

    Look sensitivity, degrees of bearing per dragged pixel. Default 0.25.

    manageMaxZoom?: boolean

    Raise the map's maxZoom to 25 while enabled so low heights are reachable (default true; 25 is maplibre's MAX_TILE_ZOOM — elevation queries go blind past it).

    Obstacle behavior: 'fly' climbs over anything; 'walk' blocks at walls. Default 'fly'.

    scrollAdjustsHeight?: boolean

    Scroll wheel adjusts the eye height while enabled (default true).

    speedMps?: number

    Movement speed, metres/second. Default 8.