Defines an axes input binding that maps analog inputs to an AxesCommand.
At least one input type must be defined. Use this for movement, camera control, or any input that needs X/Y axis values.
keyboardAxes
controllerStick
Inputs.CONTROLLER_LEFT_STICK
RIGHT_STICK
customAxesInput
const movement: AxesInputEntry = { keyboardAxes: { vertical: { up: 'w', down: 's' }, horizontal: { left: 'a', right: 'd' } }, controllerStick: Inputs.CONTROLLER_LEFT_STICK, command: new MoveCommand()}; Copy
const movement: AxesInputEntry = { keyboardAxes: { vertical: { up: 'w', down: 's' }, horizontal: { left: 'a', right: 'd' } }, controllerStick: Inputs.CONTROLLER_LEFT_STICK, command: new MoveCommand()};
Defines an axes input binding that maps analog inputs to an AxesCommand.
At least one input type must be defined. Use this for movement, camera control, or any input that needs X/Y axis values.
Input Types
keyboardAxes- Maps 4 keyboard keys to axis values (WASD, arrow keys, etc.)controllerStick- Gamepad analog stick (useInputs.CONTROLLER_LEFT_STICKorRIGHT_STICK)customAxesInput- Custom axes input for virtual joysticksExample