class_inputeventjoypadmotion.rst 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. :github_url: hide
  2. .. meta::
  3. :keywords: gamepad, controller
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventJoypadMotion.xml.
  8. .. _class_InputEventJoypadMotion:
  9. InputEventJoypadMotion
  10. ======================
  11. **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  12. Represents axis motions (such as joystick or analog triggers) from a gamepad.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. Stores information about joystick motions. One **InputEventJoypadMotion** represents one axis at a time. For gamepad buttons, see :ref:`InputEventJoypadButton<class_InputEventJoypadButton>`.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`Using InputEvent <../tutorials/inputs/inputevent>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +-------------------------------------------+---------------------------------------------------------------------+---------+
  27. | :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` | :ref:`axis<class_InputEventJoypadMotion_property_axis>` | ``0`` |
  28. +-------------------------------------------+---------------------------------------------------------------------+---------+
  29. | :ref:`float<class_float>` | :ref:`axis_value<class_InputEventJoypadMotion_property_axis_value>` | ``0.0`` |
  30. +-------------------------------------------+---------------------------------------------------------------------+---------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Property Descriptions
  35. ---------------------
  36. .. _class_InputEventJoypadMotion_property_axis:
  37. .. rst-class:: classref-property
  38. :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **axis** = ``0`` :ref:`🔗<class_InputEventJoypadMotion_property_axis>`
  39. .. rst-class:: classref-property-setget
  40. - |void| **set_axis**\ (\ value\: :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`\ )
  41. - :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **get_axis**\ (\ )
  42. Axis identifier. Use one of the :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` axis constants.
  43. .. rst-class:: classref-item-separator
  44. ----
  45. .. _class_InputEventJoypadMotion_property_axis_value:
  46. .. rst-class:: classref-property
  47. :ref:`float<class_float>` **axis_value** = ``0.0`` :ref:`🔗<class_InputEventJoypadMotion_property_axis_value>`
  48. .. rst-class:: classref-property-setget
  49. - |void| **set_axis_value**\ (\ value\: :ref:`float<class_float>`\ )
  50. - :ref:`float<class_float>` **get_axis_value**\ (\ )
  51. 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.
  52. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  53. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  54. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  55. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  56. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  57. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  58. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  59. .. |void| replace:: :abbr:`void (No return value.)`