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?
- ToneDef asked 9 years ago
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.
Please login first to submit.