0
0

Hi All,

I’m having some hassles with getting the doppler to work.

For my initial settings I’ve set the 3D settings as

System::set3DSettings( 1.0, 100.0, 1.0); // using centimetres

and then to calculate velocity for both an object and the listener velocities
I’m using the following from the Tutorial:

velVector = (newPosVecotr – oldPosVector) *1000.0 / timeDelta;

but this is causing all sorts of issues and makes the program and sound chug badly.

Should I need to update the velocity of the listener in this way, or for the object for that matter… Do I need to manually convert the vectors to be metres or does the 3DSettings take care of that for me?

Thnx

ToneDef 😕

  • You must to post comments
0
0

I’m pretty sure that the * 1000 is your problem. You’re effectively increasing the velocity by 1000, which would definitely blow out your doppler. If newPos and oldPos are already in cm, then the 2nd argument to set3DSettings should be all you need. If newPos and oldPos are not in cm, then you should use whatever units they are in when you call set3DSettings.

  • You must to post comments
0
0

Hi, Thanks for the insight, buthe tutorials tell me that I need to multiply by 1000 to get it from cm / ms to cm / s.. .. as the doppler works in per second increments.

:)

ToneDef

  • You must to post comments
0
0

Ahh. I didn’t realize that your timeDelta was in ms. Not sure I know what the problem is, then. Sorry :)

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.