I’ve successfully integrated your project into mine, can trigger events, and am properly setting the velocities in the attributes structs for the listener and the sources. But I cannot for the life of me hear any doppler working, or find a setting in Studio that lets me add that effect. I see settings for it in your Designer EX editor, is this possible in Studio?
Am I setting this up wrong in Studio somewhere? I also notice I can’t access System::set3DSettings() in the Unity scripts.
Edit: I should be clear — the sounds play and attenuate in 3D as they should (or at least it sounds like it), I can walk up to them and hear them get louder, etc.
Edit Again: I’ve now tested this with relative velocities (between listener and source) from 50m/sec to 2000m/sec and there is no audible difference.
- enemystarfighter asked 5 years ago
thx peter. works fine.
You also have to change [code:km7ilivn]static FMOD_Listener sListener = null;[/code:km7ilivn] to [code:km7ilivn]public static FMOD_Listener sListener = null;[/code:km7ilivn]
in the FMOD_Listener class, for this to work.
Yes, doppler isn’t currently implemented in Studio. It is a high priority feature and it’s on our backlog, I will let you know when we have scheduled it. In the mean time if you’re need doppler immediately you can implement in Unity like this:
[code:9xhf7f94]const float SPEED_OF_SOUND = 340.0f;
var directionOfListener = (transform.position – FMOD_Listener.sListener.transform.position).normalized;
var speedRelativeToListener = speed * Vector3.Dot(transform.forward, directionOfListener);
var dopplerPitch = (SPEED_OF_SOUND – speedRelativeToListener) / SPEED_OF_SOUND;
- Guest answered 5 years ago
- Is this still necessary? The comment from over a year ago was that Doppler wasn't implemented in Studio, but the current version of FMOD Studio does have a Doppler button and scale knob in the Event Macros section. Should there be anything else needed when using the Unity integration? I'm OK with the default values for units and speed of sound, etc. In the cases where I do have the Doppler button turned on, in Unity, those events are assigned to "FMOD_Studio Event Emitter" components attached to the appropriate GameObjects. That would be equivalent to an AudioSource in the built-in Unity audio (no coding is required to get Doppler with that).
- You must login to post comments
Please login first to submit.