Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Solar System Simulator Game

Discussion in 'Made With Unity' started by imPrgrmr, Jun 3, 2015.

  1. imPrgrmr

    imPrgrmr

    Joined:
    Oct 19, 2013
    Posts:
    14
    Last edited: Jun 3, 2015
  2. manpower13

    manpower13

    Joined:
    Dec 22, 2013
    Posts:
    140
    Hey Sotos,

    Looks really great! Just wondering, did you also upload a .exe? My physics teachers loves this kind of stuff and I would like to show him this. I would need a .exe to run it at school.

    Well done.
     
  3. imPrgrmr

    imPrgrmr

    Joined:
    Oct 19, 2013
    Posts:
    14
    Hello,

    there is no .exe but you can compile the project by yourself and build the executable.
     
  4. manpower13

    manpower13

    Joined:
    Dec 22, 2013
    Posts:
    140
    Okay, no problem. Nice job anyway :)
     
  5. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    This is really nice! Thanks for sharing. Beautiful music as well.

    I'm trying to learn how to calculate realistic planetary positions based on time, but I'm not very good with maths so I'm looking for inspiration on the internet. This is the best Unity project for realistic orbit calculations I've seen so far, as it uses Kepler orbital mechanics, which seems like the best balance between accuracy and speed.

    If I'm not mistaken, you don't seem to render orbital inclination (the angle of the orbital plane, or in other words the position of the planets on the Y-axis). Do you think this would be tricky to add? I was thinking of maybe using built-in Unity rotation for this, but not sure it would work with elliptical orbits.

    Thanks again for sharing, and good luck with everything.
     
  6. imPrgrmr

    imPrgrmr

    Joined:
    Oct 19, 2013
    Posts:
    14
    Hello,

    > Do you think this would be tricky to add?

    Not at all, it is just a rotation matrix:

    RotationMatrix[phi, theta, psi] = Transpose[ RotationMatrix[psi, {0, 0, z}].RotationMatrix[theta, {x, 0, 0}].RotationMatrix[phi, {0, 0, z}]]; in pseudocode

    where phi, theta, psi are the 3 orbital paramaters, longtitude of ascending node, inclination and argument of periapsis. You just have to be careful with the conventions. The reason that I didn't add inclination is that would make it difficult to complete the goals.

    In case you didn't notice I have uploaded the code in GitHub.
     
    Sir-Spunky likes this.
  7. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Thanks, I'll look into that! Ah, yes, I can imagine another dimension would make it way too hard to play. Those NASA guys have pretty impressive aiming.