class_inputeventjoypadmotion.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InputEventJoypadMotion.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InputEventJoypadMotion:
  6. InputEventJoypadMotion
  7. ======================
  8. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``.
  13. Properties
  14. ----------
  15. +---------------------------+---------------------------------------------------------------------+-----+
  16. | :ref:`int<class_int>` | :ref:`axis<class_InputEventJoypadMotion_property_axis>` | 0 |
  17. +---------------------------+---------------------------------------------------------------------+-----+
  18. | :ref:`float<class_float>` | :ref:`axis_value<class_InputEventJoypadMotion_property_axis_value>` | 0.0 |
  19. +---------------------------+---------------------------------------------------------------------+-----+
  20. Description
  21. -----------
  22. Stores information about joystick motions. One ``InputEventJoypadMotion`` represents one axis at a time.
  23. Tutorials
  24. ---------
  25. - :doc:`../tutorials/inputs/inputevent`
  26. Property Descriptions
  27. ---------------------
  28. .. _class_InputEventJoypadMotion_property_axis:
  29. - :ref:`int<class_int>` **axis**
  30. +-----------+-----------------+
  31. | *Default* | 0 |
  32. +-----------+-----------------+
  33. | *Setter* | set_axis(value) |
  34. +-----------+-----------------+
  35. | *Getter* | get_axis() |
  36. +-----------+-----------------+
  37. Axis identifier. Use one of the :ref:`JoystickList<enum_@GlobalScope_JoystickList>` axis constants.
  38. .. _class_InputEventJoypadMotion_property_axis_value:
  39. - :ref:`float<class_float>` **axis_value**
  40. +-----------+-----------------------+
  41. | *Default* | 0.0 |
  42. +-----------+-----------------------+
  43. | *Setter* | set_axis_value(value) |
  44. +-----------+-----------------------+
  45. | *Getter* | get_axis_value() |
  46. +-----------+-----------------------+
  47. Current position of the joystick on the given axis. The value ranges from ``-1.0`` to ``1.0``. A value of ``0`` means the axis is in its resting position.