Mecanim

Now that we have two animated rectangles, we will take a quick look at Mecanim. Mecanim is a state machine-based controller for playing animations or clips. Without getting too deep into this heavily complex animation solution, we can say that this allows us to change an object's animation with simple variables.

For instance, a character can have a speed parameter. This parameter can be set up in our code to be changed based on how far the player pushes up on the game controller. Let's imagine that the speed variable is from 0 to 10. We also have three animations: standing still, walking, and running. If the user is not pushing the game controller up at all, the variable is 0; if they are halfway, then 5; if they are all the way, then 10.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.27.244