Axis
Definition of the mapping of touch controls to the physical analog control equivalent.
Properties
input
- string. The type of touch input that this control accepts.
output
- string. The gamepad axes, axis, or polar joystick action this control maps to.
deadzone
- object, optional. The size and shape, of the area where no input will be read or mapped.
sensitivity
- number, optional. Multiplier applied after response curve calculation.
responseCurve
- object, optional. Shape of the response curve.
Input values
Constant | Description |
---|---|
axisXY | Full 2D input, reads both X-axis and Y-axis values. |
axisX | 1D input, only reads X-axis values. |
axisY | 1D input, only reads Y-axis values. |
axisUp | Polar input. |
axisDown | Polar input. |
axisLeft | Polar input. |
axisRight | Polar input. |
Output values
Constant | Description |
---|---|
leftJoystick | 2D output to the left joystick. |
rightJoystick | 2D output to the right joystick. |
leftJoystickX | 1D ouptut to the left joystick X-axis. |
leftJoystickY | 1D ouptut to the left joystick Y-axis. |
rightJoystickX | 1D ouptut to the right joystick X-axis. |
rightJoystickY | 1D ouptut to the left joystick Y-axis. |
leftJoystickLeft | Polar output to the left joystick, left direction. |
leftJoystickRight | Polar output to the left joystick, right direction. |
leftJoystickUp | Polar output to the left joystick, up direction. |
leftJoystickDown | Polar output to the left joystick, down direction. |
rightJoystickLeft | Polar output to the right joystick, left direction. |
rightJoystickRight | Polar output to the right joystick, right direction. |
rightJoystickUp | Polar output to the right joystick, up direction. |
rightJoystickDown | Polar output to the right joystick, down direction. |
relativeMouse | 2D output to the mouse. |
relativeMouseX | 1D output to the mouse X-axis. |
relativeMouseY | 2D output to the mouse Y-axis. |
relativeMouseLeft | Polar output to the mouse, left direction. |
relativeMouseRight | Polar output to the mouse right direction. |
relativeMouseUp | Polar output to the mouse, up direction. |
relativeMouseDown | Polar output to the mouse, down direction. |
Remarks
A 2D input must map to a 2D output, similarly a 1D input must map to a 1D output, and a single direction must map to a polar output.
Related Controls
Accelerometer
Gyroscope
Joystick
Throttle
Touchpad