Strata - v1.4.10
    Preparing search index...

    Interface CharacterControllerProps

    Props for the CharacterController component.

    interface CharacterControllerProps {
        children?: ReactNode;
        config?: Partial<CharacterControllerConfig>;
        enableInput?: boolean;
        inputMap?: {
            backward?: string[];
            forward?: string[];
            jump?: string[];
            left?: string[];
            right?: string[];
            sprint?: string[];
        };
        onGroundedChange?: (grounded: boolean) => void;
        onJump?: () => void;
        onLand?: (velocity: number) => void;
        position?: [number, number, number];
        sprintMultiplier?: number;
    }
    Index

    Properties

    children?: ReactNode

    Child components (typically the character mesh).

    config?: Partial<CharacterControllerConfig>

    Configuration for movement, jumping, and physical dimensions.

    enableInput?: boolean

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

    inputMap?: {
        backward?: string[];
        forward?: string[];
        jump?: string[];
        left?: string[];
        right?: string[];
        sprint?: string[];
    }

    Custom key mapping for controls.

    onGroundedChange?: (grounded: boolean) => void

    Callback fired when grounded state changes.

    onJump?: () => void

    Callback fired when a jump is initiated.

    onLand?: (velocity: number) => void

    Callback fired when landing on ground with impact velocity.

    position?: [number, number, number]

    Initial position in 3D space. Default: [0, 0, 0].

    sprintMultiplier?: number

    Speed multiplier when sprinting. Default: 1.5.