Level Editor/Viewport and camera

From TeamSpec Wiki
Revision as of 03:46, 20 October 2026 by TeamSpecBot (talk | contribs) (Level Editor: viewport, camera and four views page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The viewport is where you see and build the map. It can be one 3D view, or four views the way Hammer lays them out: one 3D view and three flat (2D) views from the top, the front and the side.

Moving the camera in a 3D view

Do this To
Hold Right mouse and move the mouse Look around.
W A S D Fly forward, left, back and right.
E / Q (or Space for up) Fly up / down.
Hold Shift while flying Fly three times faster.
Hold Ctrl while flying Fly at a fifth of the speed, for fine positioning.
Scroll wheel Change how fast you fly (it does not zoom).
Double-click a row in the scene tree Fly to that object.
View > Focus Selection Frame the selection in every view.
View > Reset Camera Go back to the starting camera position.

The fly keys work while you hold the right mouse button, or after you have clicked in the view so it has the keyboard. All of them can be rebound under Settings > Controls > Camera (see Keyboard shortcuts).

Tip: The camera's field of view is in Settings (Camera FOV, 70 degrees by default).

Turning a view

The keys act on the view under the mouse; the View menu items act on the view you last worked in.

Key View
Numpad 5 Perspective (switches a view back to 3D)
Numpad 7 / Ctrl+Numpad 7 Top / Bottom
Numpad 1 / Ctrl+Numpad 1 Front / Back
Numpad 3 / Ctrl+Numpad 3 Right / Left

F9 steps through the display modes of Viewport Rendering: Normal, Fullbright, Lighting Only, Overdraw, Wireframe and Normals.

Four views

View > Layout: Four Views splits the viewport into four: the 3D view top left, Top (looking down) top right, Front bottom left and Side bottom right. View > Layout: Single View goes back to one.

  • Drag the splitters to resize the views. The column and row splitters move together.
  • Ctrl+Space over a view fills the window with it; press it again to get the four back. The same is View > Maximize Pane (only available with four views).
  • The layout, what each view shows and the splitter positions are remembered the next time you open the editor.

The corner menu

Every view has a menu in its corner, showing the view's name. It sets:

  • What it shows: Perspective, Top, Bottom, Front, Back, Left or Right.
  • How it draws: Wireframe, Shaded or Unshaded.
  • The cut (2D views only): Clip to Selection, Slice to Selection and Clear Clip. See below.

The 2D views

Every view except Perspective is a flat view along one axis. A 2D view draws the whole map, however deep, in wireframe by default: brushes as their edges, the selected ones in red. Behind it is a grid at the editor's grid step, with a stronger line every 8 steps and teal lines through the origin. When lines would crowd closer than a few pixels the grid shows every other line, then only the strong ones. The corner shows the current grid step.

  • Pan with the Right mouse or Middle mouse button.
  • The Scroll wheel zooms in and out around the mouse.
  • The arrow keys nudge the selection one grid step in that view.

Editing in a 2D view

With the Move, Rotate or Scale tool:

  • The selection shows its bounds with eight handles, with its width and height written beside them. Drag a handle to resize the selection on the grid; the opposite side stays where it is. A brush takes the new size into its shape (it is not scaled), and a group resizes each thing in it.
    • Hold Ctrl to keep the proportions: it grows the same on all three axes, the depth too. Seen from above or below it stays standing on what it stands on.
    • Hold Alt to resize about the centre.
  • Drag inside the bounds to move the selection in that view, a grid step at a time.
  • Click the selection again to swap the handles for round rotate handles on the corners; drag one to turn the selection about its centre in 15 degree steps. Click again for the resize handles.
  • Shift turns snapping off while you drag.

Other tools in a 2D view:

  • Box: drag a rectangle and the box is made at once, with a depth from what you started on. See the Box page for the rules.
  • Edit Vertex: one handle stands for every vertex under it, front and back, so dragging a box's top corner down in the Front view makes a wedge in one move.
  • Clip: drag a line across the selected brushes to cut them, as Hammer's clipper does.
  • Ruler and Cordon: measure, or drag the cordon box.

Seeing inside buildings

A 2D view can be cut so it draws only what lies at or behind the cut. In the Top view, cut just under a roof to see the room below it.

  • Ctrl+Scroll wheel over the view moves the cut one grid step. Scrolling past the top of the map draws everything again.
  • The bar on the view's right edge does the same with a slider; its top draws everything, and the label shows where the cut is (All when there is none).
  • W and S move the cut smoothly while the view is cut.
  • The slice sets how deep behind the cut the view draws, so floors below stay out of the way. Ctrl+Shift+Scroll wheel makes it one grid step thicker or thinner; the bar shows it (all when everything behind the cut is drawn).
  • In the corner menu: Clip to Selection cuts just in front of the selection, Slice to Selection shows only the selection's depth (select a storey's floor and walls to see that storey alone), and Clear Clip shows everything again.

What a cut hides cannot be clicked.

What the views draw

The View menu decides which kinds of things are drawn in every view (collision brushes, zones, nav volumes, water volumes, prop collision, player figures, the 3D skybox) and how the map is lit in the editor (Viewport Rendering). None of it changes the map itself.

Related pages

TeamSpec Level Editor
Basics Getting started · Interface · Viewport and camera · Selecting and hiding · Keyboard shortcuts · Settings · Map Config · Troubleshooting
Menus File · Edit · View · Tools · Functional
Panels Scene tree · Inspector · Materials · Props · Snapping · UV editor · Displacement · Terrain
Tools Move, Rotate and Scale · Box · Sphere · Cylinder · Prism · Stairs · Spiral Stairs · Spiral Tower · Arch · Path Brush · Plane · Terrain · Clip · Duplicate · Ruler and Cordon · Edit Vertex and Edge · Edit Face · Loop Cut · Material Brush · Vertex Color Brush · Displacement · Prop Path
Entities Brush · Zone · Group · Mirror Node · Prop · Spawn Point · Supply Pickup · World Boundary · Lights · Water · Sounds · Anchor Platform · Payload Track · Boss Spawn · Map Marker · World Text · Decal · Door · Button · Logic entities · 3D Skybox · Nav Region
Workflows Your first map · Brushes and CSG · Materials and UVs · Lighting and lightmaps · Bots and navigation · Mirrored maps · Outputs and logic · Custom assets · Playtesting · Exporting and publishing · Importing Source maps
Scripting Overview · Server rules · Client HUD · Bots · Teams and spawning · Zones · Pickups · Payload tracks · Map entities · Sandbox limits · Testing · King of the Hill · Team Deathmatch · API reference · What a script may use