Download

Keep Character Velocity whilst playing a Root Animation Montage

I currently have a running character who has a “run-attack” montage. When I begin play and run at full speed (600 units per second) then Attack to trigger the “run-attack” montage to play, I disabled the input of the player by checking whether Root Motion is Playing. This causes the character loses all velocity (dropping down to 100 units per second due to the Root Motion) - making the animation seem very unpolished. Is there a way to maintain my velocity during a root motion animation montage?

I’ve been stuck looking for the solution for months now and it’s been the biggest burden on me! If anyone knows of an alternative or a solution please let me know.

Cheers!

Need to override few methodes like ConstrainAnimRootMotionVelocity() on UCharacterMovementComponent in C++

see UCharacterMovementComponent | Unreal Engine Documentation

Another option,

Remove the “disable input” node and add branches to your input axis.

Player presses “run attack” that sets a bool “RunAttackPressed” ,
From input axis set a float “ForwardInput” then have a branch using “Run Attack Pressed” to allow input to continue, play a constant input based on the stored float value or completely disable as per existing setup.
Yuo can use animnotifiers to reset the bool, or release key press, what ever.

This way with simple branches you can decide if movement is constant, effected by player input or stopped.
This would also allow you to decide if turning is allowed by adding same to turn axis input.

and also allows disable root motion, might be handy for collision etc.

Later you could replace branches and bools with enums and switches, depending on how complicated you need it to be.