FmodListener3D

Inherits: Node3D

Overrides the location Fmod Events are heard from.

Description

Place in the scene to set the position of the fmod listener(s). Number of

listeners in a scene is limited by fmod. having 2 listeners in a scene with the

same index will lead to undefined behavior.

Properties

bool

attached_to_parent

false

int

listener_index

0

float

listener_weight

1.0


Property Descriptions

bool attached_to_parent = false 🔗

  • void set_attached_to_parent(value: bool)

  • bool is_attached_to_parent()

If true the listener will attenuate based on the parent transform.


int listener_index = 0 🔗

  • void set_listener_index(value: int)

  • int get_listener_index()

The listener index of this node. Sets the number of listeners to at least it's listener index - 1.


float listener_weight = 1.0 🔗

  • void set_listener_weight(value: float)

  • float get_listener_weight()

Listener weighting is a factor which determines how much the listener influences the mix. It is taken into account for 3D panning, doppler, and the automatic distance event parameter. A listener with a weight of 0 has no effect on the mix.

Listener weighting can be used to fade in and out multiple listeners. For example to do a crossfade, an additional listener can be created with a weighting of 0 that ramps up to 1 while the old listener weight is ramped down to 0. After the crossfade is finished the number of listeners can be reduced to 1 again.

The sum of all the listener weights should add up to at least 1. It is a user error to set all listener weights to 0.


User-contributed notes

Please read the User-contributed notes policy before submitting a comment.