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 ...

Get Unity 5.x Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.