- Home /
3D sound not working for me
I created a 3D sound and checked the 3D Sound [*] check box.
I created a Sphere at Position X -30 Y 0 Z 30 Rotation 000 Scale X 80 Y 80 Z 80
I create a Component Physics Sphere Collider and made these settings Is Trigger [*] Radius 40 Center X 0 Y 0 Z 0
In the AudioSource variable gaudsTree0 I set the following: I set the maxDistance to 40 from the Sphere Collider radius. I set the minDistance to 6.
gaudsTree0.maxDistance = goSphere0.GetComponent<SphereCollider>().radius;
// // Distance a sound stops attenuating at.
gaudsTree0.minDistance = 6.0f;
The sound gets louder as I get to the center and softer as I get farther away. However, the sound never shuts off when I am >40 away from the center. I can always hear the sound.
Can anyone help me make the sound shut off when I am 40 away from the center?
Thanks
Try it with a smaller distance... See if it does then.
Your answer