Exploring State Machines
A State Machine in the AnimGraph allows you to organize the animation into a series of states. To exemplify this, we will create a State Machine with two states: idle and moving.
We need to define Transition Rules to control the transition from one state to another.
Follow these steps to create the State Machine:
- Remove the other animation nodes and leave only the Output Pose node in the AnimGraph.
- Right-click on the AnimGraph, search for
state machine, and select Add New State Machine…:
Figure 17.18 – Adding a State Machine
- Rename the State Machine to
Char States. You can rename it in the Details panel. Connect the white icon of the State Machine to the white icon of the Output Pose node:
Figure 17.19 – Connecting the State Machine to the Output Pose node
- Double-click on the Char States node to edit the State Machine. Then, right-click on the graph and...