I’m building a simple 2D space shooter in C#.
When the spaceship fires a bullet, I want to create a recoil effect: the spaceship moves slightly backward, then goes back to it’s position.
I tried doing this with animations, but it doesn’t work. It kind of make sense: in the animation I’m changing the position of the prefab, but I’m also moving it position when moving it around.
So how can I create an animation that changes the y position of a pefab while still being able to move the prefab around the screen?
Thanks!