Positioning the moon

Now, we will position the moon relative to the earth. To assist, let's change our scene to the top-down orthographic view:

  1. In the Scene window, use the view gizmo in the upper-right corner to give a top view (click on the y-axis arrow).
  2. Click on the box in the center of the gizmo for orthographic.

The Scene window should look something like this:

The moon is 3,84,400 km from the earth. The diameter of the earth is 12,756 km. As per our units, one Unity unit equals the earth's diameter. So, if we position the moon accurately proportional to the sizes of the bodies, it is 30.13 units from the earth:

  1. Set the Moon's Transform ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.