Ovveride Root Motion in Mecanim?

I have an Animator component which has root motion enabled but I only want to enable it for some of the animations. For example, I don’t want it to affect running animations but I do want it to affect attacking animations.

The attacking animations heavily rely on root motion and look awful if root motion is not applied.

But I don’t want root motion to also be applied to my running animations because I want to script the movement myself.

I’ve had a look around and it seems like you can the root motion of a specific animation somehow, but I haven’t found any information on how to do it.

How is this achieved?

I don’t know the answer per se, but does this help:

Can you use this as a starting point to do the opposite?

If you don’t find the answer you are looking for, here in General Support, you can try the Animation section: