MITGameLab/OpenRelativity

How easy would it be to add Einsteins relativistic effects to this simple space sim in Unity?

bochen2027 opened this issue · 1 comments

So the other day I found this gem of a solar system space ship simulator coded by some dude and he posted the source code on github.

The simplicity and "toy-scale" solar system is what I found really compelling, that unlike full scale space sims like OrbiterSim, Space Engine, Universe Sandbox, etc this one had the planets really close up together...

https://www.youtube.com/watch?v=7axImc1sxa0
https://github.com/SebLague/Solar-System

Would it be possible to set a low speed of light and then start implementing this space ship to make it incorporate relativistic effects?

Definitely possible, but it'd take a bit of work, and the results may not be accurate.

If the only thing that moved was the spaceship, you can try adding the RelativisticObject script and relativity.shader to every object, add skybox.shader to the star field skybox, tweak the MovementScripts to work with the spaceship code, and you'll get something close.

However, our implementation is only accurate for linear movement of third-party objects. If you want the planets to be orbiting and possibly rotating around their poles?, our shader does not attempt to accurately represent any kind of rotational movement. It may not crash, but it may look strange.