class_audiolistener3d.rst 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. :github_url: hide
  2. .. meta::
  3. :keywords: sound
  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/AudioListener3D.xml.
  8. .. _class_AudioListener3D:
  9. AudioListener3D
  10. ===============
  11. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  12. Overrides the location sounds are heard from.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. Once added to the scene tree and enabled using :ref:`make_current()<class_AudioListener3D_method_make_current>`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera3D<class_Camera3D>`.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  23. | :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>` | :ref:`doppler_tracking<class_AudioListener3D_property_doppler_tracking>` | ``0`` |
  24. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  25. .. rst-class:: classref-reftable-group
  26. Methods
  27. -------
  28. .. table::
  29. :widths: auto
  30. +---------------------------------------+--------------------------------------------------------------------------------------------------+
  31. | |void| | :ref:`clear_current<class_AudioListener3D_method_clear_current>`\ (\ ) |
  32. +---------------------------------------+--------------------------------------------------------------------------------------------------+
  33. | :ref:`Transform3D<class_Transform3D>` | :ref:`get_listener_transform<class_AudioListener3D_method_get_listener_transform>`\ (\ ) |const| |
  34. +---------------------------------------+--------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`is_current<class_AudioListener3D_method_is_current>`\ (\ ) |const| |
  36. +---------------------------------------+--------------------------------------------------------------------------------------------------+
  37. | |void| | :ref:`make_current<class_AudioListener3D_method_make_current>`\ (\ ) |
  38. +---------------------------------------+--------------------------------------------------------------------------------------------------+
  39. .. rst-class:: classref-section-separator
  40. ----
  41. .. rst-class:: classref-descriptions-group
  42. Enumerations
  43. ------------
  44. .. _enum_AudioListener3D_DopplerTracking:
  45. .. rst-class:: classref-enumeration
  46. enum **DopplerTracking**: :ref:`🔗<enum_AudioListener3D_DopplerTracking>`
  47. .. _class_AudioListener3D_constant_DOPPLER_TRACKING_DISABLED:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>` **DOPPLER_TRACKING_DISABLED** = ``0``
  50. Disables `Doppler effect <https://en.wikipedia.org/wiki/Doppler_effect>`__ simulation (default).
  51. .. _class_AudioListener3D_constant_DOPPLER_TRACKING_IDLE_STEP:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>` **DOPPLER_TRACKING_IDLE_STEP** = ``1``
  54. Simulate `Doppler effect <https://en.wikipedia.org/wiki/Doppler_effect>`__ by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this listener compared to those objects affect how audio is perceived (changing the audio's :ref:`AudioStreamPlayer3D.pitch_scale<class_AudioStreamPlayer3D_property_pitch_scale>`).
  55. .. _class_AudioListener3D_constant_DOPPLER_TRACKING_PHYSICS_STEP:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>` **DOPPLER_TRACKING_PHYSICS_STEP** = ``2``
  58. Simulate `Doppler effect <https://en.wikipedia.org/wiki/Doppler_effect>`__ by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this listener compared to those objects affect how audio is perceived (changing the audio's :ref:`AudioStreamPlayer3D.pitch_scale<class_AudioStreamPlayer3D_property_pitch_scale>`).
  59. .. rst-class:: classref-section-separator
  60. ----
  61. .. rst-class:: classref-descriptions-group
  62. Property Descriptions
  63. ---------------------
  64. .. _class_AudioListener3D_property_doppler_tracking:
  65. .. rst-class:: classref-property
  66. :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>` **doppler_tracking** = ``0`` :ref:`🔗<class_AudioListener3D_property_doppler_tracking>`
  67. .. rst-class:: classref-property-setget
  68. - |void| **set_doppler_tracking**\ (\ value\: :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>`\ )
  69. - :ref:`DopplerTracking<enum_AudioListener3D_DopplerTracking>` **get_doppler_tracking**\ (\ )
  70. If not :ref:`DOPPLER_TRACKING_DISABLED<class_AudioListener3D_constant_DOPPLER_TRACKING_DISABLED>`, this listener will simulate the `Doppler effect <https://en.wikipedia.org/wiki/Doppler_effect>`__ for objects changed in particular ``_process`` methods.
  71. \ **Note:** The Doppler effect will only be heard on :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>`\ s if :ref:`AudioStreamPlayer3D.doppler_tracking<class_AudioStreamPlayer3D_property_doppler_tracking>` is not set to :ref:`AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED<class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_DISABLED>`.
  72. .. rst-class:: classref-section-separator
  73. ----
  74. .. rst-class:: classref-descriptions-group
  75. Method Descriptions
  76. -------------------
  77. .. _class_AudioListener3D_method_clear_current:
  78. .. rst-class:: classref-method
  79. |void| **clear_current**\ (\ ) :ref:`🔗<class_AudioListener3D_method_clear_current>`
  80. Disables the listener to use the current camera's listener instead.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_AudioListener3D_method_get_listener_transform:
  84. .. rst-class:: classref-method
  85. :ref:`Transform3D<class_Transform3D>` **get_listener_transform**\ (\ ) |const| :ref:`🔗<class_AudioListener3D_method_get_listener_transform>`
  86. Returns the listener's global orthonormalized :ref:`Transform3D<class_Transform3D>`.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_AudioListener3D_method_is_current:
  90. .. rst-class:: classref-method
  91. :ref:`bool<class_bool>` **is_current**\ (\ ) |const| :ref:`🔗<class_AudioListener3D_method_is_current>`
  92. Returns ``true`` if the listener was made current using :ref:`make_current()<class_AudioListener3D_method_make_current>`, ``false`` otherwise.
  93. \ **Note:** There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_AudioListener3D_method_make_current:
  97. .. rst-class:: classref-method
  98. |void| **make_current**\ (\ ) :ref:`🔗<class_AudioListener3D_method_make_current>`
  99. Enables the listener. This will override the current camera's listener.
  100. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  101. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  102. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  103. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  104. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  105. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  106. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  107. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  108. .. |void| replace:: :abbr:`void (No return value.)`