class_inputeventjoypadmotion.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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>` |
  17. +---------------------------+---------------------------------------------------------------------+
  18. | :ref:`float<class_float>` | :ref:`axis_value<class_InputEventJoypadMotion_property_axis_value>` |
  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. | *Setter* | set_axis(value) |
  32. +----------+-----------------+
  33. | *Getter* | get_axis() |
  34. +----------+-----------------+
  35. Axis identifier. Use one of the ``JOY_AXIS_*`` constants in :ref:`@GlobalScope<class_@GlobalScope>`.
  36. ----
  37. .. _class_InputEventJoypadMotion_property_axis_value:
  38. - :ref:`float<class_float>` **axis_value**
  39. +----------+-----------------------+
  40. | *Setter* | set_axis_value(value) |
  41. +----------+-----------------------+
  42. | *Getter* | get_axis_value() |
  43. +----------+-----------------------+
  44. 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.