Sound and Collision Question

I have a fire on my level and I added a fire sound which works well, but I can hear it like a 100 feet away. So I need to know how to do a radius with sounds.

For collision, my guy walks through everything; like trees, the houses I added, etc. Is my guy missing a script or option? I’m using the FPS completed tutorial camera as my hero, I erased the cylinder and added the enemy model they give you as his body.

For the audio, if you change the rolloff factor, it will change the distance that you can hear the sound. If you increase it, you have to be closer to the source to hear it.

As for the collision issues, there is no script needed. If both models have some form of collider on them, they should not collide. However, for two mesh colliders to collide, you need to have one of them checked as convex. But in most cases, you don’t want your models to use a mesh collider anyway.

I kept increasing the rolloff factor, but I kept hearing the noise. I started with small numbers and went all the way up to like 8000 and nothing changed. Is there a certain type of sound file or bit-rate Unity needs?

I know the trees and other 3D objects has a collider on them, but I don’t think my FPS camera does. Right now I’m just a camera with a floating gun, do I need to assign my camera with a 3d object before it can collide with things?

Make sure that the audio is set to Mono. If it is set to stereo, then it won’t be affected by rolloff.

As for your camera, if it doesn’t have a collider attached to it, then it won’t be colliding with anything. :wink: Try adding a box collider to the fps camera. I’ve never added a collider to a camera, but I don’t see why you shouldn’t be able to do that.

Are there any plug-ins or methods to actually see where the sound is going to be? As well designed as this engine seems to be, it’s hard to believe they’d leave off something so basic. Guessing where the rolloff starts and ends is a hassle.

You can use the Gizmos.DrawWireSphere method to draw a wireframe sphere at the appropriate radius.