x


Is it possible to modify the DopplerFactor in Edit->ProjectSettings->Audio on-the-fly per scene?

For various reasons, we were forced to use individual scaling of our scenes, so several scenes are no longer in Meters. However, the Doppler Factor in Edit->ProjectSettings->Audio is a project-wide setting.

Is it possible to access the DopplerFactor from within the application, so we can modify it in each scene individually? Otherwise, the doppler effect sounds very distorted in some scenes, and is barely noticeable in others.

more ▼

asked Aug 03 '10 at 11:43 AM

Wolfram gravatar image

Wolfram
9k 8 20 52

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

The AudioSettings class doesn't expose it so I would say probably not that easily. AudioSource has doppler level, so you could do this each time a scene loads:

float someDoppler = 0.45f;
foreach(AudioSource source in Resources.FindObjectsOfTypeAll(typeof(AudioSource)))
{
    source.dopplerLevel = someDoppler;
}
more ▼

answered Feb 17 '11 at 03:03 PM

brandon1 gravatar image

brandon1
118 4 4 11

I noticed AudioSource.dopplerLevel some time ago, too, and I'm relatively sure it got added in 3.x and was not present in 2.6, because this parameter at least makes it possible to create a workaround-script that individually adjusts the doppler factor to our liking. Thanks for the answer.

Feb 19 '11 at 09:51 PM Wolfram
(comments are locked)
10|3000 characters needed characters left

I have a better idea: Change the scale factor of your meshes when you import them so they will be in meters afterwards :) might be a bit simpler for you.

more ▼

answered Aug 03 '10 at 01:13 PM

Fishman92 gravatar image

Fishman92
2.4k 101 113 128

Our imported models usually are, but as I mentioned it is not always possible to have all our scenes/models in Meters or realistic dimensions: Sometimes we use huge Terrains (>100km), sometimes we have closeups of tiny models, etc. And sometimes we use the same imported model in a number of differently scaled scenes. :-/

Aug 04 '10 at 04:04 PM Wolfram

oh ok ignore that then

Aug 04 '10 at 09:20 PM Fishman92
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1029
x525
x128
x4

asked: Aug 03 '10 at 11:43 AM

Seen: 512 times

Last Updated: Nov 16 '11 at 03:03 PM