O'Reilly logo

Mastering Unity 2017 Game Development with C# - Second Edition by Alan Thorn

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

Creating player death

In addition to building a player camera that moves from point to point, let's also establish a death animation that will feature in the Mecanim graph. With the death animation, the camera simply falls to the floor and rolls over, and this can interrupt gameplay at any time. The death animation will, of course, occur when the player is killed by a danger in the scene, such as a zombie attack. To get started on creating this, select the navigator object, and then add a new animation from the Animation window by clicking on Create New Clip...; create a new animation clip called anim_Die:

Creating a new animation clip (anim_Die) ...

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