O'Reilly logo

Babylon.js Essentials by Julien Moreau-Mathis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Defining Actions on Objects

Let's go further with the gameplay in Babylon.js. The framework provides an ActionManager class that allows us to manage and execute actions when a trigger is raised by the engine.

For example, imagine a scene with a button. When the button is pushed (left-click), the light(s) in the scene should be turned off, except one. This is only an example. In this chapter, we will cover the following topics:

  • Defining actions on objects
  • Using conditions to control the actions graph
  • Using the Actions Builder in 3ds Max

Defining actions on objects

The Babylon.js framework comes with a collection of distinct actions. You'll find actions that can play a sound, stop a sound, interpolate a property of an object, set a value of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required