Riley - V0.0.2 Devlog - Crouch Animation


While writing our player controller one of the mechanics we knew we wanted to implement from the start was a crouch mechanic. Crouching drastically improves the stealth aspects of our game and makes it feel like the player is truly sneaking around the level rather than just walking past enemies.

While crouching itself is an easy behavior to implement with the code looking something along the lines of this.


The part where things can get trickier is when we want to apply the crouching animation. Unreal has a default motion capture set of animations that we found suitable for our player. However there is one problem, the animations were made targeting a UE4 mannequin model which has a different skeleton than our player characters. Unreal has the functionality to retarget an animation to a separate skeleton however it appears this functionality is bugged in Unreal 5.2 and as such we were unable to successfully retarget these animations on Unreal 5.2. While researching the issue however I found that the exact issue we were having was fixed in Unreal 5.4 so we made the decision to switch to 5.4 and use the revamped animation retargeting system instead. The new system worked without any issues and the transition to version 5.4 was extremely simple.  

Now that we are able to setup our animation for the correct skeleton we are then able to tie our crouch mechanic into our animation blueprint. Which looks something along the lines of this. The crouch state is entered/exited based on the "Is Crouching" bool.

This leaves us with an end result that can be seen below. This mechanic showed us that while it may seem like a relatively simple system to setup, that is only the case when all the tools are choosing to cooperate. The bug in the animation retargeting system in Unreal 5.2 proved to waste a significant amount of time and made things more complicated than they needed to be.

Get Echo in the Shadows