I’ve been working on a game that has planets and moons that orbit their respective parent bodies, but haven’t been able to come up with a way of creating an accurate orbit. What I’m looking for is something similar to what the game Kerbal Space Program has for making the planets and moons orbit, and I believe it also switches the craft to using it when they become unloaded. Any idea as to how I would create this?
Perhaps this is a bit late, but, as this is one of the top search results for orbit on rails, perhaps this thread can help anyone else looking for an answer: orbit - Determining orbital position at a future point in time - Space Exploration Stack Exchange
If you don’t care about it being on rails, try these two videos: How to Simulate Gravity in Unity - YouTube and Coding Adventure: Solar System - YouTube
Edit: see reply.