class_inputeventjoypadmotion.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/InputEventJoypadMotion.xml.
  6. .. _class_InputEventJoypadMotion:
  7. InputEventJoypadMotion
  8. ======================
  9. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Stores information about joystick motions. One **InputEventJoypadMotion** represents one axis at a time.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`../tutorials/inputs/inputevent`
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +---------------------------+---------------------------------------------------------------------+---------+
  25. | :ref:`int<class_int>` | :ref:`axis<class_InputEventJoypadMotion_property_axis>` | ``0`` |
  26. +---------------------------+---------------------------------------------------------------------+---------+
  27. | :ref:`float<class_float>` | :ref:`axis_value<class_InputEventJoypadMotion_property_axis_value>` | ``0.0`` |
  28. +---------------------------+---------------------------------------------------------------------+---------+
  29. .. rst-class:: classref-section-separator
  30. ----
  31. .. rst-class:: classref-descriptions-group
  32. Property Descriptions
  33. ---------------------
  34. .. _class_InputEventJoypadMotion_property_axis:
  35. .. rst-class:: classref-property
  36. :ref:`int<class_int>` **axis** = ``0``
  37. .. rst-class:: classref-property-setget
  38. - void **set_axis** **(** :ref:`int<class_int>` value **)**
  39. - :ref:`int<class_int>` **get_axis** **(** **)**
  40. Axis identifier. Use one of the :ref:`JoystickList<enum_@GlobalScope_JoystickList>` axis constants.
  41. .. rst-class:: classref-item-separator
  42. ----
  43. .. _class_InputEventJoypadMotion_property_axis_value:
  44. .. rst-class:: classref-property
  45. :ref:`float<class_float>` **axis_value** = ``0.0``
  46. .. rst-class:: classref-property-setget
  47. - void **set_axis_value** **(** :ref:`float<class_float>` value **)**
  48. - :ref:`float<class_float>` **get_axis_value** **(** **)**
  49. 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.
  50. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  51. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  52. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  53. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`