In my audio source i have tried my
min distance setting to be 0.4 and max to be 5, i also tried to play with roll off settings but noting is working
can any 1 suggest me, whats there to be done exactly ??
In my audio source i have tried my
min distance setting to be 0.4 and max to be 5, i also tried to play with roll off settings but noting is working
can any 1 suggest me, whats there to be done exactly ??
Have you enabled 3D sound option on your audio file. If not go to your audio file then enable 3D sound option and hit apply. This should work.
-NSDG
You can also create a script of your own that sets volume based on distance.
var maxDist : float = 20;
var mySource : AudioSource;
var myPlayer : Transform;
function Update()
{
mySource.volume = 1 - (Vector3.Distance(transform.position, myPlayer.position) / maxDist);
}
hiiii, to my plane i have attached this script -
var movTexture : MovieTexture;
@script RequireComponent (AudioSource)
function Start () {
renderer.material.mainTexture = movTexture;
movTexture.Play();
audio.clip = movTexture.audioClip;
audio.Play ();
}
and attached ur script to the same plane…
i dragged to plane to My Source and FPS to My Player
Now - when i active ur script from inspector, i notice that the vol in audio source comes to 0 and i cant hear anything, and when i de-activate it, my volume is 1 and i can hear…whats going wrong ?