Language:
Page Info
Skill Level:
Engine Version:

9. Animation Blueprint - Prone State

In this final section, we finish our State Machine by adding a Prone state along with the transition to/from it.

  1. In the State Machine graph, drag in the Stand_To_Prone animation from the Asset Browser.

    AnimBP_StandToProne1.png

  2. Create a Transition from Idle_Rifle_Hip to Stand_To_Prone and click on the Transition Rule.

    AnimBP_StandToProne2.png

  3. Open the Transition Rule for Idle_Rifle_Hip to Stand_To_Prone and recreate the graph below.

    AnimBP_StandToProne3.png

  4. Return to the State Machine graph, then drag in the Prone_Idle animation from the Asset Browser.

    AnimBP_ProneIdle1.png

  5. Create a Transition from Stand_To_Prone to Prone_Idle.

  6. Drag in the Prone_To_Stand animation from the Asset Browser and create a Transition from Prone_Idle to Prone_To_Stand.

  7. Create a Transition from Prone_To_Stand to Idle_Rifle_Hip.

  8. Click on the Transition Rule for Stand_To_Prone to Prone_Idle.

    AnimBP_ProneIdle2.png

  9. In the Details panel for the Transition Rule, set the Duration under BlendSetting to 0.0.

    AnimBP_StandToProne1b.png

  10. Open the Transition Rule for the Stand_To_Prone to Prone_Idle.

  11. Inside the Transition Rule, recreate the graph below.

    AnimBP_ProneIdle3.png

    We are checking if prone is still true and if the animation of entering prone is over before entering an idle prone state.

  12. Return to the State Machine graph and open the Transition Rule for Prone_Idle to Prone_To_Stand.

    AnimBP_ProneIdle4.png

  13. Inside the Transition Rule, recreate the graph below.

    AnimBP_ProneIdle5.png

    If prone is no longer true, we are starting the sequence of returning to the standing position.

  14. Click on the Transition Rule for Prone_To_Stand to Idle_Rifle_Hip.

    AnimBP_ProneToStand1.png

  15. In the Details panel for the Transition Rule, set the Duration under BlendSetting to 0.0.

    AnimBP_ProneToStand1b.png

  16. Open the Transition Rule for Prone_To_Stand to Idle_Rifle_Hip and create the graph below.

    AnimBP_ProneToStand2.png

    Make sure that the == node is set to false (unchecked) which states that Prone is no longer true.

  17. Your full State Machine graph should look similar to below (arrangement of nodes may differ from your setup).

    Click image for full view.

  18. Compile and Save the Animation Blueprint.

  19. Return to the Content Browser and the AnimStarterPack folder, then open the Prone_To_Stand animation.

  20. Inside the Anim Asset Details window, set the Rate Scale value to 1.4 under the Animation section.

    ProneToStand_Rate.png

    This will increase the playback rate of the animation slightly and improve the look when going from prone to standing.

  21. Click the Save button in the Content Browser and Main Toolbar to save your assets and the level.

  22. Click the Play button to play in the editor.

You should now have a fully animated character that can move around your level in a number of different ways. You should be able to Walk, Crouch Walk, Jog, Jump (from a stationary or moving position), or go Prone from a Standing or Jogging state.

There are several other states that can be added to this State Machine (Death, Reload, etc.) or you could swap out the existing motions with your own. In either case, you should now have an understanding of how to set up Character Movement in Blueprints, define animation states with an Animation Blueprint, and how to blend animations through Blend Spaces.