O'Reilly logo

Unity 5.x Cookbook by Chico Queiroz, Matt Smith

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

Implementing slow motion

Since Remedy Entertainment's Max Payne, slow motion, or bullet time, became a popular feature in games. For example, Criterion's Burnout series has successfully explored the slow motion effect in the racing genre. In this recipe, we will implement a slow motion effect triggered by the pressing of the mouse's right button.

Getting ready

For this recipe, we will use the same package as the previous recipe, BallGame in the 1362_11_02 folder.

How to do it...

To implement slow motion, follow these steps:

  1. Import the BallGame package into your project and, from the Project view, open the level named BallGame_01.
  2. In the Inspector, create a new tag Ball, apply this tag to prefab ball in the Prefabs folder, and save the scene.
  3. Add 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