My students and I want to animate a simple capsule (moving vertically up and down), then duplicate it as part of the roll-a-ball tutorial. Problem is: they all jump to the original position of the first capsule.
How do we animate and make the capsule prefab without them doing this?
Here’s a video of how we animated it, made the prefab, duplicated it, and then the jumping to same location problem.
That is not very surprising, you are storing positions in the animation which will be applied as soon as you start the animation.
To achieve what you want you can simply create an empty gameobject and set you capsule with your animation as a child to the empty object. Now you can move the empty object as you want and the child will perform its animation in relation to the parent.
so in short: create the empty GO / capsule object, set the position of the capsule relative to the empty GO to 0,0,0 - now create your animation for the capsule → done