Version
We can get information about the game object's proximity to the player from the game engine and use it through a new game parameter called Distance_to_Player throughout the project.
It's easy to get distance info and other values directly from the Wwise audio engine. You can subscribe to a built-in value for the distance between the listener and the game object from a list of built-in values calculated inside of the audio engine using the "Bind to Built-In-Parameter" drop-down menu.
The following built-in parameters are calculated by the audio engine and are available to be bound to game parameters:
Distance - Distance to game object.
Azimuth - Horizontal angle.
Elevation - Vertical angle.
Object-to-listener Angle - Angle between object's orientation and the listener.
Occlusion - As set by the game on the game object.
Obstruction - As set by the game on the game object.
Interpolation can be used to apply a kind of "smoothing" to the values sent by the audio engine. The modes (other than None) let you modify the rate (in Units) or time (in seconds) when target values go upward (Attack) or downward (Release). Adding an Interpolation Mode helps keep values from the game engine from "jumping" or "stepping" too quickly which may cause, for example, a voice volume to abruptly increase in volume. The Interpolation properties allow for controlled transitions between Game Parameter values sent from the game or from within the Wwise audio engine.
In this example, the behavior of the Distance_to_Player game parameter is modified using the Interpolation properties available in the Game Parameter Property Editor.
Interpolation Modes can be set using the Mode drop-down list and include:
Interpolation Mode - None: Jump straight to the target value.
Interpolation Mode - Slew Rate: Limit the game parameter variation rate to the specified Attack and Release rate. (Units)
Interpolation Mode - Filtering Over time: Filter the game parameter current value to target 99.5% of the target value within the specific Attack/Release time. (Seconds)
The Interpolation Mode for the Distance_to_Player Game Parameter will be set to "Slew Rate" with a Attack (in Units) of 50 and Release (in Units) of 50 to produce the desired effect.
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise