I think that it could develop into the likes of Super Mario Galaxy, and you can go with a theme that's about disorientation or whatever (Galaxy is disorienting at times) if you choose this as the iterative, maybe if it's with puzzles you can factor gravity into them.
I think if the gravity swapping were to become much smoother, I'd say you can try to add like a jetpack or grapple so that you can fling yourself from planet to planet, it would be a game with lots of movements.
Nothing much besides the jarring teleporting between planets to connect to them.
The commenting looks alright, it's good just because people get to understand what a line or chunk of code does, I like it.