The spaceship (you) will always stick to the mouse until you get hit. When you get hit, you will teleport back to the bottom left corner of the screen. After 2 seconds, you will return to the mouse-pointer.
Special thanks to bwinker-qlms22 for the creation of the original game, this is just my version of it. The only thing different from the other one is that this one has a "healing" planet, and I fixed the bug where you don't teleport back to spawn after getting hit.