Been working on this solar system program for some time now and there is a few things left to do. One of them that i have no idea about is objects overlapping each other. My program is quite long so i won’t post it all. To understand what my problem is though you can check out this example program i found on this site.
Looking at that example it seems ok, but if you change the color of the planet and make it solid you’ll see it really isn’t rotating around the sun. If you hold down the ‘y’ key the planet starts moving anti-clockwise but as it passes the sun it still stays infront of it.
I was looking for a way to make the planet go behind the sun then come back in front of it as it went around.
Any help would be great.