- Home /
Pitch changes when i get closer to object with audio source
This is really weird, I have a zombie object that has the following components: Navmesh agent, Ai script, Rigidbody, and audio source. it also has some disabled components as shown in the picture: when I get close to the Zombie the pitch changes from low to high depending on the distance somehow (i tried with a 3d cube and it worked normally). this is the audio source settings attached to the zombie:
The weird part is this, when I enable the capsule collider component it works fine :) I wonder why? what's the relation?
The audio listener is attached to the character and the Ai script doesn't modify or manage any audio component. Does anyone have an idea of what's happening, please? I'm really puzzled.
Answer by MounirDev · Mar 27 at 09:13 PM
SOLVED just make sure you toggle Is Kinematic on the rigidBody component. Still don't know how this affects sound tho.
According to your screenshot, Doppler Level is currently at 1.
When you set your Rigidbody as kinematic, you're effectively ignoring/negating the Doppler Effect aspect of the audio source.