Animation only working in one spot?

So I have made a basic character with a camera and a character controller, and today I assigned a simple jump animation to the parent of all the components ( this was an empty Game Object in my case ). I got it to work that when I press the space bar the animation plays, but if I run to a random position, when I play the animation it will teleport the character back to the start position then play the animation.

so what can I do to make the animation play wherever the character is?

here is great resource on understanding what is happening

I had a similar problem, the solution is to put the animated object in a parent object. This makes the transform of the animated object be a child of the transform of the parent object. So, you can move the (absolute) position of the parent object without changing the (now relative) position of the animated object. Then when you play the animation, the object is at the right xyz position already, and it doesn’t jump to the start point.