Animation "Apply Root Motion" is generating a lot of problems
Basically the title. I have some animations for a gun (I made the animations inside Unity), but they generate me a lot of problems with some scripts.
This is my current setup:
The player (Parent)
The player's camera (child of Player, parent of Arm model)
An arm model, which is holding the actual gun model. (child of Player's Camera, Parent of the gun)
The weapon script that I have actually controls the animations from the arm model, so if I'm shooting, the arm is the one that gets animated.
I have a script that creates the "weapon sway" effect when I move the camera, however, to make it work, I need to check the Apply Root Motion from the animator of the Arm model.
Unfortunately, if I do that, the animations stop working, they literally never start.
So I had the idea of creating a "weapon holder" (an empty GameObject, that could serve me as a parent for the arm model) with the script attached, and now the animations play, but they act pretty crazy (the keys become very exaggerated).
The same for any other script that tries to make a change to the arm's transform (even for the aim of the gun, which is impossible to do because of that).
Since I made the animations inside Unity, I don't have too many options on the animation itself but Loop and...and that's it, just Loop.
So...do I need to create the animations outside Unity? Should I change something from my hierarchy? Or is it a bug?
Your answer
Follow this Question
Related Questions
Animator vs Animation Clip via Scripting 0 Answers
How to Apply Animation to Player 0 Answers
Opening Cutscene 0 Answers
NEED HELP ANIMATING PLAYER MOVEMENT 0 Answers