rzsavilla / BlobsonicEngine

Group Project: 3D OpenGL Game Engine
GNU General Public License v3.0
2 stars 0 forks source link

3D Sound Easy with irrKlang #69

Closed rzsavilla closed 7 years ago

rzsavilla commented 7 years ago

http://www.ambiera.com/irrklang/tutorial-3dsound.html

Looks very easy to make.

If an entity has both sound and transformable component that sound is 3D. Use the transformable components position to set the position of the sound.

Else just play the sound as 2D.

The listener's position will always be the position of the active camera. So just have the Audio system look for the active camera entity.