You can navigate a scene view (a 3D map):
- Using built-in navigation (described on this page), such as panning, zooming, and changing pitch
- By programmatically changing camera position
The scene view control has a number of built-in interactions that allow you to navigate a scene (3D) using the mouse, touch gestures, or the keyboard. General panning and zooming operations for 3D are the same as navigating a map (2D). Using the left mouse button you can pan around the scene, and using the mouse scroll wheel you can zoom in or out.
Pressing the right mouse button allows you to adjust the camera pitch and heading.
Zoom in / out
- and + keys
W: tilt up
S: tilt down
P: perpendicular to surface
A: move counterclockwise
D: move clockwise
N: point true north
U: move up
J: move down
Programmatically change camera position
Your applications can programmatically navigate a 3D scene by creating a new camera and setting it to the scene view. A camera defines the location from which you are viewing the scene.
Set the camera
For example, to point the camera to toward the Snowdon mountainside, as shown in the following code snippet and image, use these values:
- For 3D location, use 53.06 latitude, -4.04 longitude, 1289 metres above sea level
- For heading, use 295 degrees
- For pitch, use 71 degrees
// add a camera and initial camera position (Snowdonia National Park)
Camera camera = new Camera(53.06, -4.04, 1289.0, 295.0, 71, 0.0);
Now you have a new camera you can apply to your scene view. You can apply it immediately using setViewpointCamera as shown in the code below, or the camera can be animated to the new position using one of the asynchronous methods.