Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / DEFAULT_INPUT_ACTIONS

Variable: DEFAULT_INPUT_ACTIONS ​

ts
const DEFAULT_INPUT_ACTIONS: InputActionMap;

Defined in: input/bindings.ts:210

Actions every game gets. A script reads this.input.getAxis("move") and the player can use WASD, arrows, either stick, the D-pad or the touch stick.

move is { x: right, y: forward }, each -1..1. look is in pixels this frame like getMouseDelta() (y grows downward), so a camera written for the mouse works unchanged with a stick or a finger.