Input Docs

Gamepads Input

Input Index

Purpose

Read raw gamepad input as devices are detected, then map engine indices to players when stable assignment matters.

Gamepads Input explains behavior, constraints, and practical usage so implementation decisions stay consistent across scripts and scenes.

API Source

Functions

gamepad_down!gamepad_pressed!gamepad_released!gamepad_left_stick!gamepad_right_stick!gamepad_gyro!gamepad_accel!

Enums

GamepadButton

Constants

index: connected gamepad slot

Types

InputWindowVector2Vector3ScriptContext

Usage Pattern

let jump = gamepad_pressed!(ipt, 0, GamepadButton::South);let move_axis = gamepad_left_stick!(ipt, 0);let aim_axis = gamepad_right_stick!(ipt, 0);

Key Details

Access module: ipt.Gamepads().

Read buttons with down/pressed/released helpers.

Read left stick, right stick, gyro, and accelerometer values.

Use PlayerBinding::Gamepad when player mapping matters.