class_inputeventjoypadmotion.rst 2.1 KB

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