PlaceholderGames / Team1-2017

Team 1 CS2S561 game
2 stars 3 forks source link

Earth model & planet rotation #12

Closed SharktasticA closed 6 years ago

SharktasticA commented 6 years ago

When creating the gravity model, I used a free asset from the Unity asset store (which was specified by the tutorial I used to create the gravity model with): https://www.assetstore.unity3d.com/en/#!/content/23399

It comes with up to a 4K texture for Earth and a spin script for graceful planet rotation. I'm going to take a deeper look into the spin script since it will be useful to get that functionality out of the way now. I also hope to see if this script can be modified/rewritten to provide spin for another objects such as spacecraft and other interstellar bodies.

SharktasticA commented 6 years ago

I've rewritten the spin code into a new script (ObjectRotator.cs), and I have cut out most of the unneeded (for us) code and kept what we needed.

I've attached a document explaining the code and how to use it, as well as a ZIP file containing the script itself. The next step will be to develop multi-axis rotation into the script. 2017-10-20_object_rotator.pdf ObjectRotator.zip