class_inputeventjoypadmotion.rst 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventJoypadMotion.xml.
  6. .. _class_InputEventJoypadMotion:
  7. InputEventJoypadMotion
  8. ======================
  9. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Represents axis motions (such as joystick or analog triggers) from a gamepad.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Stores information about joystick motions. One **InputEventJoypadMotion** represents one axis at a time. For gamepad buttons, see :ref:`InputEventJoypadButton<class_InputEventJoypadButton>`.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`Using InputEvent <../tutorials/inputs/inputevent>`
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +-------------------------------------------+---------------------------------------------------------------------+---------+
  25. | :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` | :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:`JoyAxis<enum_@GlobalScope_JoyAxis>` **axis** = ``0``
  37. .. rst-class:: classref-property-setget
  38. - void **set_axis** **(** :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` value **)**
  39. - :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **get_axis** **(** **)**
  40. Axis identifier. Use one of the :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` 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. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  54. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  55. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  56. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`