Creating the planets with textures

The steps for creating the other eight planets are much like what we followed earlier in the project.

Repeat the following steps for each planet:

  1. With SolarSystem selected in Hierarchy, right-click on 3D Object | Sphere.
  2. Name the planet, reset its Transform, and delete its Collider.
  3. Scale the planet to the size suggested in the preceding table.
  4. Position it (x-axis) in a reasonably spaced manner between its neighbors.
  5. If not imported already, import the planet's .png texture file into Assets/SolarSystem/Textures.
  6. Drag the texture onto the planet sphere.
  7. On the material, disable Specular Highlights and Reflections.
  8. Add a Spin component and set its rotation rate as suggested in the table.
  9. Add an Orbit component and set the orbital period to the number of earth days, as suggested in the table.
  10. Drag Sun onto the Around Body slot.
It might be quicker to duplicate an existing planet object (Ctrl+D), attach its material, and set its scale and orbital period.

The following screenshot shows all our planets defined and lined up neatly in the Scene window:

Isn't that a sight to behold?

When working in the Scene view, you may want to disable the scene lighting by unclicking the Scene Lighting toggle in its toolbar, especially for the outer planets that may appear in the shadow of Jupiter.

When ready to test, press Play (remember, you might need to set Gametime Per Day on GameController to 0.05 to see all the orbits in faster action).

One more thing to note: if you want to change the model scale as a whole and keep the proportions you've set up, scale the SolarSystem container object in Hierarchy, rather than the individual objects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.187.24