Advanced animation setup

Hi guys,

I believe at this point I understand most of the basic premises of setting up an Animation blueprint, and I’ve set up up for my third person character at this point.

I have quite a nice stockpile of high quality animations to choose from, so I’m attempting to make the most of them. Where I am stuck specifically is making a crouch setup. Now I’m very well aware that I can just setup a crouch state, and a standing state, and use State machines to just blend between them to get a reasonable blend. However, I’m sitting here with some nice crouching transition animations that have detail inside of them that cant be capture by a simple blend. So here you can see how I have my State Machine set up. Pretty straightforward. Standing state, Crouching state, and a stand to crouch and a crouch to stand state. Transition rules are as simple as if crouch = true enter transition state, and then if crouching still = true AND the animation is finished, transition to the crouch idle state, and then backwards for the other way.

So this system works ok, but it really has no way to handle if the player spams the crouch button. Ideally Id want the player to be able to get down to like halfway into the crouch transition animation, and change their mind, and have the animation reverse itself out.

So the second photo is what I’ve attempted to do to fix that. I tried to make a play rate variable, that flip flops between 1 and -1 whenever the player hits crouch. This property is updated in the animation blueprint every time the player hits crouch. I’ve used print screens to debug that this “Stand to Crouch interrupt play rate” variable is updating correctly, and it alternates between 1 and -1. The problem is the animation never changes direction. My expectation is that it would stop and immediately reverse when it was hit but it doesn’t. Can the play rate on the animation not be updated dynamically while the animation is playing? Am i going about this the whole wrong way? Any suggestions on fixing this setup or a whole new setup that achieves what I’m trying to do would be very appreciated :slight_smile:

Thank you