Strata - v1.4.10
    Preparing search index...

    Interface VehicleBodyProps

    Props for the VehicleBody component.

    interface VehicleBodyProps {
        children?: ReactNode;
        config?: Partial<VehicleConfig>;
        enableInput?: boolean;
        inputMap?: {
            accelerate?: string[];
            brake?: string[];
            handbrake?: string[];
            steerLeft?: string[];
            steerRight?: string[];
        };
        onSpeedChange?: (speed: number) => void;
        position?: [number, number, number];
        rotation?: [number, number, number];
    }
    Index

    Properties

    children?: ReactNode

    Child components (typically the vehicle mesh).

    config?: Partial<VehicleConfig>

    Configuration for motor force, braking, and chassis dimensions.

    enableInput?: boolean

    Whether to enable built-in WASD/Arrow keyboard input. Default: true.

    inputMap?: {
        accelerate?: string[];
        brake?: string[];
        handbrake?: string[];
        steerLeft?: string[];
        steerRight?: string[];
    }

    Custom key mapping for controls.

    onSpeedChange?: (speed: number) => void

    Callback fired when vehicle speed changes.

    position?: [number, number, number]

    Initial world position. Default: [0, 0, 0].

    rotation?: [number, number, number]

    Initial world rotation. Default: [0, 0, 0].