Fly-by object implementation
DRONE FLY-BY
As you can see there are three box colliders attached to this drone. Each collider will trigger a different event switch in Wwise, based on their position in relation to the player. With Wwise's position editor we can automate the 3d position triggered by each switch. Also we can set an attenuation based on distance from the player.

In addition the flying drone has a looping engine sound that is modulated to create a doppler effect. The modulation is controlled by a distance RTPC that drives: pitch, volume, high pass filter, and spread.

AUDIO COMPONENT
In order to calculate the flying drone RTPC distance from the player in Unreal, I created C++ component named Wwise_RealTime_RTPC. This component can run the SetRTPCValue function every frame in our script.

However, running this function every frame is overkill. We don't need to update our sound every frame. Because of that I make sure to set the component's tick interval to a higher value than zero. In this case I set the component's tick to .07. With blueprints we can set the RTPC value with our custom component and since our component updates less regularly than the Tick function, we don't have to worry about waisting memory.



Without this component we could add a delay at the end of the function and then loop back to update. This method is still ver useful but it requires a significant amount of extra nodes, specially if we want to add bool conditions. I like the simplicity of using this custom component.