Skip to content

Viewport Navigation

This page covers moving the camera in a Scene viewport and selecting and transforming entities with the mouse and keyboard. There are three ways to move the camera: the fly camera on the right mouse button, the orbit camera on Alt or the middle mouse button, and the scroll wheel for zooming. With no mouse button held, clicks select entities and single keys pick transform tools or move, rotate and scale the selection.

The rest of the viewport (its toolbar, settings, icons and Play-mode overlays) is described in The Viewport.

In short

Hold the right mouse button and use W A S D to fly. Drag with the middle mouse button, or hold Alt and drag, to orbit, pan and zoom around the orbit point, and press F to frame the selection. Press Q, W, E or T to pick a transform tool, or G, R or S to move, rotate or scale the selection straight from the keyboard.

Camera controls work in the Scene tab under the cursor, including Scene tabs moved to a separate window. For camera navigation, the left and right Shift, Ctrl and Alt keys work the same.

Fly camera

Hold the right mouse button to fly. Press it with no modifier keys held, or it will not start fly mode. The cursor is hidden while you fly. Release the button to get the cursor back.

Input Effect
Mouse movement Look around (yaw and pitch)
W   /   S Move forward / backward
A   /   D Strafe left / right
Q   /   E Move down / up (world up)
Mouse scroll Change fly speed, by about 30% per notch
Hold Shift Fly faster
Hold Ctrl Fly slower

Pitch is clamped just short of straight up and straight down, so the camera will not flip over. Because each scroll notch changes the speed by a fraction of itself, scrolling makes small adjustments at low speeds and large ones at high speeds. The base speed is also the Speed field in the toolbar's Camera menu (see The Viewport).

Flying carries the orbit point along with the camera, so it stays the same distance in front of you.

macOS

On macOS, Ctrl + left-click also starts fly mode, for mice with a single button. Release the left button to stop flying.

Orbit camera

The orbit camera turns around the orbit point, a point a set distance in front of the camera. Hold Alt and drag with a mouse button, or drag with the middle mouse button on its own.

Input Effect
Alt + left-drag Orbit around the orbit point
Alt + middle-drag Pan: move the orbit point and camera left, right, up or down
Alt + right-drag Zoom in or out
Middle-drag Orbit around the orbit point
Shift + middle-drag Pan
Ctrl + middle-drag Zoom in or out
Ctrl + scroll Orbit around the orbit point

During these drags the cursor stays on screen and wraps around at the viewport edges, so a drag never runs out of room.

Zooming with the scroll wheel

Outside fly mode, the scroll wheel moves the camera towards or away from the orbit point. Each notch covers about 13% of the current distance, up to 5 m, and the camera never gets closer than 0.05 m. Zooming changes only the distance: the view direction and the orbit point stay where they are, so an object you framed with F stays at the centre of the orbit.

Hold Ctrl while you scroll to orbit instead of zooming: scrolling up and down turns the view up and down, and scrolling sideways, for example with two fingers on a trackpad, turns it left and right.

Where the orbit point comes from

Zooming and orbiting never move the orbit point. These do:

  • F, which frames the selection (see Focusing on the selection).
  • Double-clicking an entity in the Scene Hierarchy, which centres the active viewport on it and keeps the current distance.
  • Panning.
  • Flying, which carries the orbit point along.

Focusing on the selection

With the cursor over a Scene tab, press F to frame the selection. The camera keeps its view direction and moves back to twice the entity's bounding radius, between 0.1 m and 100 m, with the entity at the orbit point. F with the Scene Hierarchy focused does the same in the active viewport.

  • With several entities selected, F frames the first one in the selection.
  • If the selected entity is part of a Procedural Mesh (see Procedural Graphs), F frames the whole Procedural Mesh.
  • With nothing selected, F does nothing.

Lost the scene?

If the camera has drifted away from everything, select an entity in the Scene Hierarchy and press F.

Selection and gizmos

Selecting

Left-click an object to select it. Clicking empty space clears the selection.

Input Effect
Click Select the object under the cursor
Ctrl + click Add the object to the selection, or remove it if it is already selected
Shift + click Select the whole imported MuJoCo model the object belongs to, or, for other objects, its topmost parent
Esc Clear the selection (with the Scene tab or Scene Hierarchy focused)

A few rules decide what a plain click selects:

  • Clicking part of an imported MuJoCo model, such as a robot, selects the top-level body that the part belongs to. Use Shift + click to select the whole model.
  • While icons are shown, camera, light and audio icons can be clicked to select their entity. When several things are under the cursor, the nearest wins.
  • Hidden meshes cannot be clicked; the click goes to whatever is behind them.
  • Holding the left Alt key while you click orbits the camera without changing the selection.

The selection is shared by every Scene tab and the Scene Hierarchy.

Transform tools

These keys work while the cursor is over a Scene tab, the right mouse button, Ctrl and Alt are not held, and no text field is being edited. They do nothing in the active viewport during Play. The same tools are on the left of the viewport toolbar.

Key Tool
Q Select: selection only, no gizmo
W Translate gizmo
E Rotate gizmo
T Universal gizmo: move, rotate and uniform scale together
none Scale gizmo: click Scale on the toolbar

R does not pick a tool: it starts a keyboard rotation of the selection.

The gizmo works in world axes by default. Choose Local from the toolbar's Transform Space button to align it with the selected entity's own axes.

Note

The same letter keys mean different things depending on the right mouse button. With it held, W A S D Q E move the camera. Without it, Q W E T pick tools and G R S start keyboard transforms.

Using the gizmo

Drag a handle of the gizmo to move, rotate or scale the selection along it. While you drag, a readout near the entity shows the value, and the cursor wraps around at the viewport edges.

  • Hold Ctrl while dragging to snap to fixed steps. Hold Ctrl+Shift to snap to steps one tenth that size.
  • Press Esc or right-click during a drag to cancel it.
  • The click that selects an entity never grabs a handle as well. Click the handle again to start dragging.

The snap steps are set in the Settings panel, under Application → Editor → Gizmo Snap Values:

Setting Default
Translation Snap Value 0.5 (metres)
Rotation Snap Value 15 (degrees)
Scale Snap Value 0.1

With several entities selected, the toolbar's Transform Pivot button (Transform tools) decides whether they rotate and scale around a shared pivot (Median Point) or each around its own origin (Individual Origins).

For an imported MuJoCo model's root entity, the Rotate gizmo rotates the model's first top-level body, and scaling has no effect.

If no gizmo appears, check that overlays are shown and look at gizmo Visibility in the toolbar's Overlay menu. During Play the gizmo is hidden in the active viewport by default.

Keyboard transforms

You can move, rotate and scale the selection straight from the keyboard, without grabbing a gizmo handle. With an entity selected and the cursor over the viewport:

  1. Press G to move, R to rotate or S to scale. The selection follows the mouse, and a readout near it shows the current value.
  2. Optionally press X, Y or Z to lock the change to one axis, or type a value.
  3. Left-click or press Enter to confirm. Right-click or press Esc to cancel and put the selection back.

While a keyboard transform is running:

Input Effect
G, R, S Switch to move, rotate or scale
R again, while rotating Toggle trackball rotation, which turns freely in two directions
X, Y, Z Lock to that axis. Press the same key again to switch from the global axis to the entity's local axis, and a third time to remove the lock. The readout shows Global X or Local X.
Shift+X, Shift+Y, Shift+Z Lock to the plane at right angles to that axis (move and scale only)
Middle-drag Lock to the axis closest to the direction you drag; add Shift for the plane at right angles to it
Middle-click Remove the current lock, or lock to the closest axis if there is none
Hold Ctrl Snap to the gizmo snap steps; add Shift for steps one tenth that size

Without a lock, moving follows the mouse across the screen, rotating turns around the view direction, and scaling is uniform.

Typing exact values

Type a number to set the value exactly instead of following the mouse:

  • Move: the distance in metres. You can end the number with a length unit: mm, cm, m, km, in or ft (for example 25cm). Without an axis lock the number applies to X first; press Tab to go on to Y and Z.
  • Rotate: the angle in degrees. With trackball rotation, Tab switches between the horizontal and vertical angle.
  • Scale: a factor, so 2 doubles the size. Press Tab to type separate X, Y and Z factors.

Press - to flip the sign of the number. Backspace, Left and Right edit it. Delete the whole number to go back to following the mouse.

For example, to move the selection 1.5 m up: press G, Y, type 1.5 and press Enter.

MuJoCo joints

To adjust a MuJoCo joint rather than the entity it belongs to, press P with the cursor over the viewport, or turn on MuJoCo Joints in the toolbar's Overlay menu. Then pick a transform tool and select a single entity that has a MuJoCo joint component:

  • The joint's axis is drawn as an orange line, with a dot at its pivot.
  • With the Translate tool, the gizmo moves the joint's pivot.
  • With the Rotate tool, the gizmo re-aims the joint's axis.

The entity itself does not move. Press P again to go back to moving entities.

Viewport shortcuts

These shortcuts act on the Scene tab under the cursor or with focus, while the right mouse button is not held. Like the single-key shortcuts above, all but Tab do nothing in the active viewport during Play.

Shortcut Effect
Ctrl+Shift+B Toggle bounding boxes. Ctrl+B on its own builds the project's C# scripts.
Ctrl+G Toggle the ground grid
Ctrl+P Toggle the collider view
Tab Toggle Fullscreen, which hides the Left, Right and Bottom zones (with the Scene tab focused: click in it first)

These editor shortcuts are often used with the viewport:

Shortcut Effect
Del Delete the selected entities (with a Scene tab or the Scene Hierarchy focused)
Ctrl+D Duplicate the selection (edit mode)
Ctrl+C / Ctrl+V Copy and paste entities (edit mode)
Ctrl+Z / Ctrl+Y Undo / redo
F5 Play the scene, or stop it while it runs (while it is paused, click Stop instead)
Alt+P Play or stop, like F5 (with a Scene tab or the Scene Hierarchy focused)
Alt+C During Play, switch the active viewport between the game camera and the free editor camera, like Free Camera on the toolbar

Note

Unlike camera navigation, Ctrl+G, Ctrl+P, Ctrl+Shift+B, Ctrl+Z, Ctrl+Y, Alt+P, Alt+C, snapping while dragging a gizmo handle and the Shift plane locks of keyboard transforms respond only to the left-hand Ctrl, Alt and Shift keys.

For every editor shortcut, see Settings.

At a glance

Mode How to enter Headline action
Fly Hold right mouse W A S D to move, mouse to look, scroll for speed
Orbit Middle mouse, or hold Alt Drag to orbit; add Shift (middle mouse) to pan; scroll to zoom; Ctrl + scroll to orbit
Selection and gizmos No button held Click to select, Q W E T for tools, G R S to transform, F to focus

Where to go next

  • The Viewport covers the toolbar and its menus, icons and adding content.
  • Editing Values explains the number fields used for transforms in the Scene Hierarchy.
  • Units lists the units the editor uses for distances and angles.
  • Settings has the full list of editor shortcuts.