So I was wondering how to set up a crouch system for my character so he can have a crouch idle when not moving, but then when he starts moving, he starts walking in the crouched position. And how to get back to the normal upright position. Would i do it in the character blueprint or his animation blueprint? And i have all the animations ready to be used, i just need to apply them in a system that is smooth.
You do it the same as with the walk/idle.
- create a new state in the anim graph and add your crouching blendspace (just copy the walk/idle blendspace + change the animations)
- now connect the variables to the blendspace (speed)
- enable “can crouch” in the character bp
- in the anim blueprint event graph you have to cast to your character bp + get the crouch variable
- create a new bool variable in your anim bp and connect the set from it with the upper mentioned get variable
- in the anim graph in the transitions you will have to add the new variable -> from the idle to the crouch you have to just add the bool and from crouch to idle you have to add a “not” + the variable
So all that works!
Thanks for the help!