I'm making a simulation of the solar system. I'm making Mercury right now, but for some reason I'm guessing gravity is too strong? Mercury just falls straight into the sun. I don't know how to fix that except by changing the gravitational constant, but I want to keep it at 6.6743e-[something]. I'd appreciate it if someone tried helping me. Since I need to sleep and go to school and stuff.
EDIT: I want the user to be able to add or remove arbitrary bodies. That’s why I’m doing it like that instead of setting a defined orbit for each planet.
I set G to 6.6743e-17 but Mercury still falls straight into the sun. However it goes in a perfect circle when I multiply the initial velocity by 30 with the modified G value. Mercury shouldn't actually orbit in a perfect circle though -- its orbit is actually an ellipse. When I multiply the initial velocity by 15, it gives me an almost perfect elliptical orbit.
All the sources I've looked at say that Mercury's velocity when furthest from the sun is something below 100 km/s though. Maybe I'm accounting for time wrong.