Reader small image

You're reading from  Unity 5.x Animation Cookbook

Product typeBook
Published inMay 2016
Reading LevelExpert
PublisherPackt
ISBN-139781785883910
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Maciej Szczesnik
Maciej Szczesnik
author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik

Right arrow

Creating an elevator triggered by player input


In this last recipe, we will use player input to create a simple elevator.

Getting ready

Before we start, you should prepare an elevator model to contain the objects: the root object called Elevator, the Lift object (this one will be animated), and the ElevatorFrame object, which will work as decoration. The Lift and ElevatorFrame objects should be children of the empty Elevator object. You can also use the example Unity project provided and go to the Chapter 02 Working with the animation view\Recipe 07 Creating an elevator triggered by player input directory. You will find an Example.unity scene there with the Elevator game object and its children Lift and ElevatorFrame objects. The Elevator is already animated in the example assets.

How to do it...

To create an elevator triggered by player input, follow these steps:

  1. Select the root Elevator object and assign an Animator component to it. Set the Update Mode to Animate Physics.
  2. Open Window | Animation...
lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Unity 5.x Animation Cookbook
Published in: May 2016Publisher: PacktISBN-13: 9781785883910

Author (1)

author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik