Skip to content

gg-car-keyboard-handling.controller overview


Table of contents


utils

GgCarKeyboardControllerOptions (type alias)

Signature

export type GgCarKeyboardControllerOptions = CarKeyboardControllerOptions & {
  gearUpDownKeys: [string, string]
  autoReverse: boolean
  handbrakeKey: string
}

GgCarKeyboardHandlingController (class)

Signature

export declare class GgCarKeyboardHandlingController {
  constructor(
    protected readonly keyboard: KeyboardInput,
    public car: GgCarEntity | null,
    protected readonly options: GgCarKeyboardControllerOptions = {
      keymap: 'arrows',
      maxSteerDeltaPerSecond: 12,
      gearUpDownKeys: ['KeyA', 'KeyZ'],
      autoReverse: true,
      handbrakeKey: 'Space',
    }
  )
}

onSpawned (method)

Signature

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

tickOrder (property)

Signature

readonly tickOrder: TickOrder.INPUT_CONTROLLERS

carHandlingInput (property)

Signature

readonly carHandlingInput: CarKeyboardHandlingController

switchingGearsEnabled (property)

Signature

switchingGearsEnabled: boolean