:github_url: hide .. meta:: :keywords: sound .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioListener3D.xml. .. _class_AudioListener3D: AudioListener3D =============== **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` Overrides the location sounds are heard from. .. rst-class:: classref-introduction-group Description ----------- Once added to the scene tree and enabled using :ref:`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`. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ | :ref:`DopplerTracking` | :ref:`doppler_tracking` | ``0`` | +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------+--------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_current`\ (\ ) | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_listener_transform`\ (\ ) |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_current`\ (\ ) |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | |void| | :ref:`make_current`\ (\ ) | +---------------------------------------+--------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioListener3D_DopplerTracking: .. rst-class:: classref-enumeration enum **DopplerTracking**: :ref:`🔗` .. _class_AudioListener3D_constant_DOPPLER_TRACKING_DISABLED: .. rst-class:: classref-enumeration-constant :ref:`DopplerTracking` **DOPPLER_TRACKING_DISABLED** = ``0`` Disables `Doppler effect `__ simulation (default). .. _class_AudioListener3D_constant_DOPPLER_TRACKING_IDLE_STEP: .. rst-class:: classref-enumeration-constant :ref:`DopplerTracking` **DOPPLER_TRACKING_IDLE_STEP** = ``1`` Simulate `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_AudioListener3D_constant_DOPPLER_TRACKING_PHYSICS_STEP: .. rst-class:: classref-enumeration-constant :ref:`DopplerTracking` **DOPPLER_TRACKING_PHYSICS_STEP** = ``2`` Simulate `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`). .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioListener3D_property_doppler_tracking: .. rst-class:: classref-property :ref:`DopplerTracking` **doppler_tracking** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_doppler_tracking**\ (\ value\: :ref:`DopplerTracking`\ ) - :ref:`DopplerTracking` **get_doppler_tracking**\ (\ ) If not :ref:`DOPPLER_TRACKING_DISABLED`, this listener will simulate the `Doppler effect `__ for objects changed in particular ``_process`` methods. \ **Note:** The Doppler effect will only be heard on :ref:`AudioStreamPlayer3D`\ s if :ref:`AudioStreamPlayer3D.doppler_tracking` is not set to :ref:`AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioListener3D_method_clear_current: .. rst-class:: classref-method |void| **clear_current**\ (\ ) :ref:`🔗` Disables the listener to use the current camera's listener instead. .. rst-class:: classref-item-separator ---- .. _class_AudioListener3D_method_get_listener_transform: .. rst-class:: classref-method :ref:`Transform3D` **get_listener_transform**\ (\ ) |const| :ref:`🔗` Returns the listener's global orthonormalized :ref:`Transform3D`. .. rst-class:: classref-item-separator ---- .. _class_AudioListener3D_method_is_current: .. rst-class:: classref-method :ref:`bool` **is_current**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the listener was made current using :ref:`make_current()`, ``false`` otherwise. \ **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. .. rst-class:: classref-item-separator ---- .. _class_AudioListener3D_method_make_current: .. rst-class:: classref-method |void| **make_current**\ (\ ) :ref:`🔗` Enables the listener. This will override the current camera's listener. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`