Class reference

AudioListener3D

Inherits Node3D

Overrides the location sounds are heard from.

Description

Once added to the scene tree and enabled using make_current(), this node will override the location sounds are heard from. This can be used to listen from a location different from the Camera3D.

Properties

Methods

void clear_current()

Disables the listener to use the current camera's listener instead.

bool is_current() const

Returns true if the listener was made current using 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.

void make_current()

Enables the listener. This will override the current camera's listener.

Constants

DOPPLER_TRACKING_DISABLED = 0

Enum: DopplerTracking

Disables Doppler effect simulation (default).

DOPPLER_TRACKING_IDLE_STEP = 1

Enum: DopplerTracking

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 AudioStreamPlayer3D.pitch_scale).

DOPPLER_TRACKING_PHYSICS_STEP = 2

Enum: DopplerTracking

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 AudioStreamPlayer3D.pitch_scale).

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.