- Home /
How do I avoid scaling the animation when scaling the object?
I have made an animation in the Unity animation window. When root motion is disabled, the animation works, but when root motion is enabled, the object goes upwards instead of downwards as specified in the animation. How can I fix the animation so that it works with root motion?
Here is a video showing the issue
EDIT: I managed to fix the rotation issue by rotating the gameobject to the initial rotation before the animation plays. But now I have another issue: since the gameobject is scaled by 12, the animation is also scaled by 12, so the object goes way too far. Is there a way to disable animation scaling? I already recorded the animation with everything scaled up.
Answer by AngryKiwiArts · Nov 26, 2016 at 09:29 PM
Try putting your object in an empty and then scaling the empty
That didn't work. It seems that what actually happened wasn't that the animation was scaled with the object. What actually happened is that while root motion is enabled, the position varies relative to the object's forward vector, and not relative to the object's position in world space. Is there any way to make the animation work like when root motion is off but with the start and end positions relative to the object's world position when the animation starts? I managed to make the animation work but I don't want to have to guess the values when making the animation in the inspector.
Your answer
![](https://koobas.hobune.stream/wayback/20220612101046im_/https://answers.unity.com/themes/thub/images/avi.jpg)