Experimenting with Unity's animation state machine

We usually see a lot of things going on in Unity's animation state machine graph when we work alongside artists focused on animations, or when we use our own if we have a thing for this discipline; however, it's uncommon seeing things happening in code on top of it. We usually change states via the MonoBehaviour script, and deal with the behaviors in a separate manner.

In this recipe, we will use some of the basic movement behaviors created in Chapter 1, Behaviors Intelligent Movement, as they are, and we will make our animator control their status.

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.