To make a character dodge, follow these steps:
- Import the character into Unity and place it in a scene.
- If you want the character to get damage and play hit reactions, follow the previous recipe.
- Create a new Animator Controller or edit the one from the previous recipe.
- Drag and drop the Dodge animation into the controller.
- Create a Dodge Trigger parameter in the controller.
- Create two transitions:
- SpiderIdle | Dodge with one condition: Dodge Trigger parameter. Has Exit Time should be set to false and Transition Duration set to 0.2 seconds.
- Dodge | SpiderIdle with no conditions: Has Exit Time should be set to true and Transition Duration set to 0.2 seconds.
- Add a Rigidbody component to the Spider character and freeze its ...