use inplace and rootmotion animations together

hi

some of my animations has root motion and some has not (inplace). i want to use them together on same character in mecanim. but when i implement OnAnimatorMove() function, i lose rootmotion of animations.

any tips about how to solve this?

thanks

You’d have to turn the animation on in the AnimatorController, but apply force through coding (e.g. rigidbody.AddForce or rigidbody.AddRelativeForce) for the non-rootmotion animations, and for the ones with root motion, turn them on through your AnimatiorController.

OR

If you have Unity Pro, you can change the non-rootmotion animations to have root motion (the docs have the steps for that).

If you have any questions, feel free to ask!

Hope this helps- Hyperion