Root Motion combat movement - curious how most people are doing this

Basically I have my combat working fine using root motion… when my character attacks he steps forward and swipes his sword or spins, etc.

However because its using root motion the character has to do the entire animation before I can move my character so its seems clunky and unresponsive when I need to move away quickly after starting an attack. The attacks are fairly quick but it still feels like I should have more control to move instantly if I need to.

It would be cool… if I pressed the input axis (i.e. W or S key to move forward or back) to instantly stop/cancel/override that attack and move instead of finishing that root motion attack montage.

Is there a way to stop the root motion and move instead if the player press W or S (because its not doing that right now)

I am actually doing a blend by bone if the player is moving… so he can run and upper body does the root motion while hes running (this actually works great and is super responsive if i change direction, etc.)

however I have it setup NOT to blend by bone if he as no velocity and have his legs involved in the root motion attack - this is where it is forced to do entire root motion animation before allowing me to move which seems very clunky and unresponsive and would like to fix this.

Any suggestions?

Thanks

Hi,
you can turn root motion rotation on or off. I’m doing this inside of an animation notify like so:

This requires you to put notifies in all of your attacking animations, but gives you complete control of when the player is able to rotate. You can also use notifies to do other things like specify a point where the player is free to move or queue up another attack or whatever.

Just wanted to chime in here for anyone else having trouble with this.
I created an Anim Notify State that toggles “Allow Physics Rotation During Anim Root Motion”

If it’s a notify, then it MAY be a bad solution.
Notify - by design - is called whenever the call is possible, which is often not at an exact time.

Root Motion is usually not a good idea for combat anyway.
If you change the actor location based on an animation curve you can get the same effect while having the character able to replicate movement over the network.
It just takes some know-how and curve editing.

1 Like