O'Reilly logo

Alice 3 Cookbook by Vanesa S. Olsen

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

Following characters with the camera

In this recipe, we will allow the user to select the actor that the camera has to follow by pressing shortcut keys. We will add the necessary code to instruct the camera to follow a specific instance when the user presses certain key. The camera will continuously change its position to get a good look at the desired instance as Alice renders the animation.

Getting ready

We will use a project that makes two robots dance when the user clicks on the scene:

  1. Open the project saved in the Defining a mouse button listener recipe, in Chapter 8, Working with Keyboard and Mouse Input.
  2. Click on Edit Code, at the lower right corner of the big scene preview. Alice will show a smaller preview of the scene and will display the ...

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