Description
Tested versions
Found in 4.5
Happens in 4.4
System information
Windows 10
Issue description
When calculating doppler effect pitch, only the velocity of the AudioStreamPlayer3D
is taken into account, even though both players and listeners should have their velocities used for the calculation. Because of this, if doppler is desired on stationary objects while the listener zooms by, such as in a racing/flight game, no doppler effect will be heard. In addition, if a doppler-enabled AudioStreamPlayer3D
is moving with the current AudioListener3D
at the same velocity, the pitch will be affected even though there should be no change. The one exception to this last case is when the emitter and listener move perpendicularly to how they are arranged, in which case no doppler effect is heard.
Here is a video of the minimal reproduction project in action (sound on):
2025-06-21.04-29-25.mp4
Steps to reproduce
- Download and play the reproduction project (4.4)
- Click "Static Listener, Moving Player". Observe how the doppler effect works correct here.
- Click "Moving Listener, Static Player". Observe how the doppler effect now does nothing.
- Click "Both Moving (on axis)". Observe how the doppler effect is occuring even though it should not be.
- Click "Both Moving (perpendicular)". Observe how there is now no noticeable doppler effect.