View Navigation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{first room menu}}
{{first room menu}}
To get a proper 3D perspective of your work, you will need to be able to control setting the 3D camera view.
In order to maintain a proper perspective as you work, Hammer offers a 3D camera view.  There are two different methods to control the 3D view: you can use the keyboard & mouse to navigate through your map or you can set up cameras.


This can be done in two ways: You can either use the keyboard to navigate through your map, or you can rig up cameras.
==Keyboard/mouse navigation==


==Keyboard/mouse navigation==
'''Simple Navigation'''
Keyboard/mouse navigation will let you fly freely through the map while your mouse pointer is over the 3D view. You will not collide with anything while doing this. Just make sure not to stray too far from your work, or you might not find your way back to it again. If this does happen, don't worry, just use the camera method described below to reset a new camera near the level. Alternatively, the fade distance can be decreased/increased with the <code>1/2</code> keys, which may make it easier to find the level.


The basic keyboard controls are simple:
To navigate through your map using keyboard & mouse navigation, select the Camera tool [[Image:hammer_camera.png]] from the left hand menu.  You can navigate using the W,A,S,D keys much like you would navigate in game to move forward and backward and to strafe left and right.  In simple navigation, you can turn left, right, up, or down using the arrow keys. Alteratively, you can left or right click in the camera view window to look around (left click) or dolly the camera position (right click).
* To move your position, use the <code>W</code>, <code>A</code>, <code>S</code>, and <code>D</code> keys. These work like the default in-game steering, moving your position forward, left, back and right, respectively.
* To change the direction you are facing, press and hold the <code>Space</code> key and click and hold the Left Mouse Button (LMB) and you can look like in-game. Or alternatively use the arrow keys.


To move and look using the mouse:
To move and look using the mouse:

Revision as of 16:02, 31 March 2008

In order to maintain a proper perspective as you work, Hammer offers a 3D camera view. There are two different methods to control the 3D view: you can use the keyboard & mouse to navigate through your map or you can set up cameras.

Keyboard/mouse navigation

Simple Navigation

To navigate through your map using keyboard & mouse navigation, select the Camera tool Hammer camera.png from the left hand menu. You can navigate using the W,A,S,D keys much like you would navigate in game to move forward and backward and to strafe left and right. In simple navigation, you can turn left, right, up, or down using the arrow keys. Alteratively, you can left or right click in the camera view window to look around (left click) or dolly the camera position (right click).

To move and look using the mouse:

  • Press the Z key to enter "mouselook" mode. This toggles between arrow keys and mouse control. Press Z again to exit this mode and return to regular mouse control.
  • Left-click in the 3D view to look around, and right-click to "dolly" the camera position. The mouse will return to normal when you release both the space bar and the mouse button.

If you haven't created any brushes yet, you can use the origin mark of the map (the meeting red, blue and green lines that you start at) for something to move around.

Creating a camera

Select the camera.
Create a camera by dragging its position.

To set up a camera, select the red Camera Tool from the list of icons on the left side of the Hammer window by clicking on it.

Click and drag your mouse in a 2D view to create the camera, as shown to the right. The 3D view will change to the new camera, and the 2D windows will display your camera as a blue circle with a line leading from it.

You can change the position of the camera by dragging the blue circle around with the mouse in the 2D views, and where it will point by dragging the other end of the line around. The 3D view will update as the camera changes.

  • You can use the PageUp and PageDown keys to switch between any created cameras, if you've made more than one in the map.
  • The last selected camera is restored when you save the map and open it later.


Moving in the 2D views

Select Magnify.

You can use the Magnify Tool to zoom in and zoom out of the 2D viewports. First select the Magnify icon from the icon bar. Now left-click in a 2D viewport to increase the magnification, and right-click to zoom back out.

Once you've learned the basics, here are some shortcuts for moving in the 2D views:

  • If your mouse is equipped with a mouse wheel, you can use it instead to change the zoom level in all of the viewports: Forward will zoom in and backwards will zoom out.
  • Hold down Space and use the left mouse button to drag and quickly pan in 2D views.
  • The 1 through 0 (zero) keys zoom the window at different preset zoom levels.
  • The + and - keys on can be used to zoom in and out.

See also