- Home /
Animation Moves to 0, 0, 0
I am having the problem that where ever (the coordinate I created the animation) is where the animation starts playing... What I would want it to do is that the animation works anywhere. This means that if I put the animation on a specific position on Scene... when I press Play that the animation will stay there instead of going to the position I created the animation in.
The only thing that seemed to work was putting the animated object in another empty gameobject.. but I do not want to do that!
Answer by tanoshimi · May 10, 2017 at 12:37 PM
Unity animations describe local positions (and rotations). If you want to use an animation relative to a different origin, the "correct" way to do it is to attach them to a child object so that they become local to the parent at the new origin. Why do you not want to do that?
The only other alternative would be to store the starting position of the object in Start(), and then apply this as an offset to the animated value in LateUpdate(), say, but that's very hackish.