The last thing to do is set up the state machine and write the code that will make the various animations play.
To hook up the various animations and have them play at the correct time, complete the following steps:
- We'll start by creating the state machine that will work as the logic for our animation sequences. Create a new Animator Controller named ChestOpeningStateMachine.controller in Assets/Animations/Controllers.
- Open the ChestOpeningStateMachine Animator Controller and create 12 new empty states. Arrange, name, and transition the states, as shown in the following screenshot:
The ...