How to make Audio "Range" Further.

I’m making a FPS, Adding Cars. Everything is working except when the sound controller for the car created a gameobject called audio it does this.

	AudioSource CreateAudioSource (AudioClip clip) {
		GameObject go = new GameObject("audio");
		go.transform.parent = transform;
		go.transform.localPosition = Vector3.zero;
		go.transform.localRotation = Quaternion.identity;
		go.AddComponent(typeof(AudioSource));
		go.audio.clip = clip;
		go.audio.loop = true;
		go.audio.volume = 0;
		go.audio.Play();
		return go.audio;
	}

and this here where the vehicle Camera is the engine is quiet. Is there is a way to add a peice of code to increase the range of the audo like you do in the scene by dragging the “Points” to increase the range. Please help me :slight_smile:

This is written in C#.

You can modify go.audio.maxDistance and go.audio.minDistance to your liking.
They are the maximum distance at which the sound will be heard, and the distance at which the sound will start fading respectively

Unity has an easy built in logarithmic rolloff function for audio: link for the max distance and min distance