Quick Start
beginner quick startWorld Map Globe Ultra Edition · Quick Start
This page shows the globe in a few steps: first with the demo scene, then in a new scene of your own.
Open the Demo
- Open
Assets/WorldMapGlobeUltraEdition/Demos/01 Planetary Flight/PlanetaryFlight.unity. - Wait a few seconds: the Game view shows the planet from 800 km over the center of Spain while the first tiles download. The globe also works in Edit mode, so you do not need to enter Play mode to see it.
- Enter Play mode. Click a place in the Places tab of the panel to fly there, write a latitude and a longitude or an address in the field of that tab, or fly with the keyboard and the mouse.
Flight Controls
| Input | Action |
|---|---|
| W / S | Move forward and back along the view |
| A / D | Move left and right |
| Q / E | Move down and up (roll the camera when Level Horizon is off) |
| Space / Left Ctrl | Move toward the top and the bottom of the screen |
| Right mouse button and mouse | Look around |
| Shift | Fly faster |
The speed follows the height of the camera over the ground: the camera is fast in orbit and slow near the ground. See Flight Camera.
Add the Globe to a New Scene
- Create a new scene with a camera and a Directional Light.
- Select the camera and choose Add Component > Planetary Flight Camera. In the Camera component, set Background Type to Solid Color with a black color, so that outer space is black.
- Create an empty GameObject and choose Add Component > World Map Globe Ultra. The globe finds the flight camera of the scene and fills its Camera field.
- The Directional Light is the Sun. The globe uses the Sun of the Lighting window, or else the brightest directional light of the scene. To choose another light, assign it to Sun Light in Universe Settings.
- Select the camera and set Latitude, Longitude and Altitude (m) in Location Settings. This is the place where the camera starts. The Game view moves to that place in Edit mode too.
- Enter Play mode and fly.
The camera stays at the origin - The flight camera stays at the origin of the scene and the planet is placed around it at real scale. Do not move the camera with its Transform. To place your own objects on the planet, add a Planetary Anchor to them. See Anchors.
The camera must render the layer of the globe object. With the default settings, both use the Default layer.
Your First Script
This script flies the camera to a place when Play mode starts and shows the credits that the application must display:
using UnityEngine;
using WPM;
public class FlyToStart : MonoBehaviour {
public WorldMapGlobeUltra globe;
void Start () {
// Latitude, longitude and altitude in meters above sea level
globe.flightCamera.FlyToLocation(48.8584, 2.2945, 1500);
}
void OnGUI () {
GUILayout.Label(globe.Attribution);
}
}
Next Steps
- Globe Settings - every option of the globe.
- Political Map - borders, colors, highlights and names.
- Scripting Support (C#) - the full API.
Was this page helpful?
Suggest an improvement
Help us improve this documentation page.