Camera Navigation

The camera navigation in TrenchBroom is quite simple and straightforward. However, there are subtle differences between using a trackpad and using a mouse. These differences will be explained below. Generally, you always have to press and hold the shift key ⇧ to navigate the camera in the 3D view. Just like in Quake, the camera cannot be rolled - in other words, up is always in the positive Z direction and down is always in the negative Z direction.

Quick info
The quick info bar helps you keep your orientation.

To help you keep your orientation, the quick info bar at the bottom of the 3D view (see screenshot) always displays information about the current camera location and direction. The compass on the left visualizes the camera direction by rendering the coordinate axes. The X axis has red color, the Y axis has green color and the Z axis has blue color.

Controlling the Camera

Looking Around

You can look around by holding the shift key ⇧ while clicking and dragging with the left mouse button.

Moving Around

To move the camera foward and backward, hold the shift key ⇧ and use the scroll wheel on your mouse. To move the camera sideways and up / down, hold the shift key ⇧ while clicking and dragging with the right mouse button. If you are using a trackpad, you can move the camera forward and backward by using the two-finger zoom gesture while holding the shift key ⇧ and you can move the camera sideways and up / down by using the two-finger scrolling gesture while holding the shift key ⇧.

You can also move the camera using the cursor keys and the page up and page down keys while holding the shift key (⇧). To move the camera forward and backward, press ⇧↑ and ⇧↓ and to move the camera left and right, press ⇧← and ⇧→. The camera an be moved up and down by pressing the page up and page down keys (⇧⇞ and ⇧⇟). If you hold the option key (⌥) while pressing these keyboard shortcuts, the camera will move by one unit. This allows you to precisely position the camera.

Orbiting the Camera

The camera orbit mode allows you to rotate the camera about a selectable point. To get an idea as to what this means, imagine that you define a point in the map by clicking on a brush. The point where you clicked will be the center of your camera orbit. Now image a sphere whose center is the point where you just clicked and whose radius is the distance between the camera and the point. Orbiting will move the camera on the surface of that sphere while adjusting the camera's direction so that you keep looking at the same point. Visually, this is the same as rotating the entire map about the orbit center. Of course, you are not actually rotating anything - only the camera's position and direction are modified. However, since up and down are always fixed, you cannot cross the north and south poles of the orbit sphere.

Camera orbit mode is very useful if you are editing a brush because it allows you to view this brush from all sides quickly. Its best to try it and see for yourself how useful it is. To invoke the orbit mode, click and drag with the left mouse button while holding the shift and command keys ⇧⌘. The orbit center is the point in the map which you initially clicked. Dragging sideways will orbit the camera horizontally and dragging up and down will orbit the camera vertically.

Predefined Camera Views

If you looked closely at the screenshot of the quick info bar above, you saw three buttons below the camera location and direction info fields. These buttons are labeled XY, XZ and YZ and their function is to take the camera to one of three predefined views using smooth camera tracks:

The camera will always be positioned so that it looks straight at the center of the current selection. If nothing is selected, it will look at a default point in front of the camera.

Navigating to Arbitrary Objects

Jump to any object using the map browser.

To navigate to any object in the map, simply select it in the Map browser, located in the Map tab of the inspector. The camera will quickly be moved to the selected object.