Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Input
  5. checkAxis

checkAxis

Platform Compatibility

PC Mac OSX Oculus Quest
X X

Check axis value against a deadzone

Axis values:

  • Horizontal
    • The default Left/Right or A/D keys and left stick X axis on any gamepad
  • Vertical
    • The default Up/Down or W/S keys and left stick Y axis on any gamepad
  • Mouse X
    • The mouse X axis
  • Mouse Y
    • The mouse Y axis
  • Analog X
    • The gamepad right stick X axis from any gamepad
  • Analog Y
    • The gamepad right stick Y axis from any gamepad
  • Left Trigger
    • The gamepad left trigger axis from any gamepad
  • Right Trigger
    • The gamepad right trigger axis from any gamepad
  • Horizontal1
    • The left stick X axis on gamepad 1
  • Vertical1
    • The left stick Y axis on gamepad 1
  • Analog X1
    • The gamepad right stick X axis from gamepad 1
  • Analog Y1
    • The gamepad right stick Y axis from gamepad 1
  • Left Trigger1
    • The gamepad left trigger axis from gamepad 1
  • Right Trigger1
    • The gamepad right trigger axis from gamepad 1
  • Horizontal2
    • The left stick X axis on gamepad 2
  • Vertical2
    • The left stick Y axis on gamepad 2
  • Analog X2
    • The gamepad right stick X axis from gamepad 2
  • Analog Y2
    • The gamepad right stick Y axis from gamepad 2
  • Left Trigger2
    • The gamepad left trigger axis from gamepad 2
  • Right Trigger2
    • The gamepad right trigger axis from gamepad 2
  • Horizontal3
    • The left stick X axis on gamepad 3
  • Vertical3
    • The left stick Y axis on gamepad 3
  • Analog X3
    • The gamepad right stick X axis from gamepad 3
  • Analog Y3
    • The gamepad right stick Y axis from gamepad 3
  • Left Trigger3
    • The gamepad left trigger axis from gamepad 3
  • Right Trigger3
    • The gamepad right trigger axis from gamepad 3
  • Horizontal4
    • The left stick X axis on gamepad 4
  • Vertical4
    • The left stick Y axis on gamepad 4
  • Analog X4
    • The gamepad right stick X axis from gamepad 4
  • Analog Y4
    • The gamepad right stick Y axis from gamepad 4
  • Left Trigger4
    • The gamepad left trigger axis from gamepad 4
  • Right Trigger4
    • The gamepad right trigger axis from gamepad 4

Parameters:

  • axis
    • A string value
  • deadzone Optional
    • A float value

returns a Float (decimal number) value

Example:

1
obj.checkAxis(axis, deadzone)
Tags
Was this article helpful to you? Yes No

How can we help?