class_inputeventjoypadmotion.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``.
  11. Description
  12. -----------
  13. Stores information about joystick motions. One ``InputEventJoypadMotion`` represents one axis at a time.
  14. Tutorials
  15. ---------
  16. - :doc:`InputEvent <../tutorials/inputs/inputevent>`
  17. Properties
  18. ----------
  19. +-------------------------------------------+---------------------------------------------------------------------+---------+
  20. | :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` | :ref:`axis<class_InputEventJoypadMotion_property_axis>` | ``0`` |
  21. +-------------------------------------------+---------------------------------------------------------------------+---------+
  22. | :ref:`float<class_float>` | :ref:`axis_value<class_InputEventJoypadMotion_property_axis_value>` | ``0.0`` |
  23. +-------------------------------------------+---------------------------------------------------------------------+---------+
  24. Property Descriptions
  25. ---------------------
  26. .. _class_InputEventJoypadMotion_property_axis:
  27. - :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **axis**
  28. +-----------+-----------------+
  29. | *Default* | ``0`` |
  30. +-----------+-----------------+
  31. | *Setter* | set_axis(value) |
  32. +-----------+-----------------+
  33. | *Getter* | get_axis() |
  34. +-----------+-----------------+
  35. Axis identifier. Use one of the :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` axis constants.
  36. ----
  37. .. _class_InputEventJoypadMotion_property_axis_value:
  38. - :ref:`float<class_float>` **axis_value**
  39. +-----------+-----------------------+
  40. | *Default* | ``0.0`` |
  41. +-----------+-----------------------+
  42. | *Setter* | set_axis_value(value) |
  43. +-----------+-----------------------+
  44. | *Getter* | get_axis_value() |
  45. +-----------+-----------------------+
  46. 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.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  49. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  50. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  51. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  52. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`