Language:
Page Info
Skill Level:
Engine Version:

6. Animation Blueprint - Crouch States

Choose your OS:

In this section, we continue working on the Animation Blueprint and the State Machine focusing on the Crouch states.

  1. In the MyAnimationBlueprint on your State Machine graph, drag in the Crouch_BS Blend Space from the Asset Browser.

  2. Create a Transition from Crouch_BS to Walk_BS and from Walk_BS back to Crouch_BS.

    AnimBP_Crouch2.png

  3. Double-click on the Crouch_BS and drag in the Direction and Speed variables and connect them to the Blend Space.

    AnimBP_Crouch3.png

  4. Return to the State Machine graph and open the Transition Rule for Walk_BS to Crouch_BS and recreate the graph below.

    AnimBP_Crouch4.png

    Here we are allowing the player to enter crouched walking when crouched is pressed and their speed is greater than 0.

  5. Return to the State Machine graph and open the Transition Rule for Crouch_BS to Walk_BS and recreate the graph below.

    AnimBP_Crouch5.png

    Above we are returning the player to a walking state when they are no longer crouched and their speed is greater than 0.

  6. Return to the State Machine graph, then in the Asset Browser drag into the graph the Crouch_Idle_Rifle_Hip animation.

    AnimBP_CrouchIdle1.png

  7. Create a Transition from Crouch_BS to Crouch_Idle_Rifle_Hip and from Crouch_Idle_Rifle_Hip back to Crouch_BS.

  8. Also create a Transition from Crouch_Idle_Rifle_Hip to Idle_Rifle_Hip, and from Idle_Rifle_Hip back to Crouch_Idle_Rifle_Hip.

    AnimBP_CrouchIdle2.png

    Here we are providing transitions for our crouch walk to enter crouch idle (and from crouch idle to crouch walk). We are also setting a transition from our crouch idle to a standing idle (and from standing idle to a crouch idle).

    If needed, you can move the nodes around on your graph to get a better picture of the transitions.

  9. Open the Transition Rule for Idle_Rifle_Hip to Crouch_Idle_Rifle_Hip.

  10. For this Transition, we are only requesting that IsCrouch be True.

    AnimBP_CrouchIdle3.png

  11. Return to the State Machine graph, then open the Transition Rule for Crouch_Idle_Rifle_Hip to Idle_Rifle_Hip.

  12. For this Transition, we are only requesting that IsCrouch be False.

    AnimBP_CrouchIdle4.png

  13. Return to the State Machine graph, then open the Transition Rule for the Crouch_BS to Crouch_Idle_Rifle_Hip.

    AnimBP_CrouchIdle5.png

  14. In the Transition Rule, recreate the graph below.

    AnimBP_CrouchIdle6.png

    If the player is crouched and their speed is 0, then they will enter the crouch idle animation.

  15. Return to the State Machine graph, then open the Transition Rule for the Crouch_Idle_Rifle_Hip to Crouch_BS.

    AnimBP_CrouchIdle7.png

  16. In the Transition Rule, recreate the graph below.

    AnimBP_CrouchIdle8.png

    If the player pressed crouch and their speed is greater than 0, they will enter the crouch walk Blend Space.

  17. Compile and Save the Animation Blueprint.