Summary

This quick chapter demonstrates that using sounds (2D and 3D) in a 3D engine can be easy when powerful tools are provided to the developer. The example files create a 2D sound that is played as a soundtrack and a 3D sound located at the box's position. Do not hesitate to play with the distance models and check the effects using your headphones.

In the next chapter, we'll try to automate some things using the ActionManager class of Babylon.js. This class is useful for executing actions on objects when a trigger is raised. For example, if the player left-clicks on the box, it plays the sound named my_sound.wav. It's also the time to introduce Actions Builder, which is a part of the Babylon.js 3ds Max exporter. Actions Builder allows artists ...

Get Babylon.js Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.