I know this question has been asked many times, but no answer satisfied me. I want my player to play an animation on death, but when it does it’s sent back to the position where the animation was created. I know that this can be solved by parenting the player to an object, but I don’t want to do that. Is there some way to work around it or will I have to use this method?
How did you create your animation?
With the built-in animation window in Unity. It’s just a placeholder and the final one will be made in Maya, but at the moment I need a way to make it work with this way.
You need to do two things:
- Turn on ‘Apply Root Motion’ on your Animator component
- Select the Animation asset you created, and click the ‘Generate root motion curves’ button in the Inspector.
This almost works, but the player returns to its original state while the animation is playing. I’m trying to make it fall backwards, but instead it kind of leans backwards and then straightens. Any idea why?
Hmm… did you click ‘generate root motion curves’ for your fall-backwards animation as well?
I did. But I think I’ve found the problem. It seems to be caused by the First Person Controller script, which forces the player to stand straight. I had thought of that and therefore made sure it’s deactivated when the animation plays, but for some reason it still happens. But that’s a different matter, so I’ll have to find a way to figure that out or make a new thread. Thanks for the help, though!
Where is the “generate root motion curves” option for Unity 2021? I’m having the same problem but can’t find that anywhere.
dude I found I guess disable apply avatar mask
create new animation track and click on that track then disable that function