Skip to content

car-keyboard-handling.controller overview


Table of contents


utils

CarHandlingOutput (type alias)

Signature

export type CarHandlingOutput = { upDown: number; leftRight: number }

CarKeyboardControllerOptions (type alias)

Signature

export type CarKeyboardControllerOptions = {
  readonly keymap: DirectionKeyboardKeymap
  readonly maxSteerDeltaPerSecond: number
}

CarKeyboardHandlingController (class)

Signature

export declare class CarKeyboardHandlingController {
  constructor(
    protected readonly keyboard: KeyboardInput,
    protected readonly options: CarKeyboardControllerOptions = {
      keymap: 'arrows',
      maxSteerDeltaPerSecond: 12,
    }
  )
}

onSpawned (method)

Signature

async onSpawned(world: GgWorld<any, any>): Promise<void>

onRemoved (method)

Signature

async onRemoved(): Promise<void>

tickOrder (property)

Signature

readonly tickOrder: TickOrder.INPUT_CONTROLLERS

directionsInput (property)

Signature

readonly directionsInput: DirectionKeyboardInput