Using positional audio in a game
To increase the realism of the sounds we use in a game, we can modify audio properties based on in-game factors. In this example, we use source distance, audible range, and object size to determine gain, pitch, and pan.
We’ll demonstrate this by adding sounds to the TopDownIsometric demo from Chapter 4, Physics.