View Navigation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Better)
m (minoro)
Line 1: Line 1:
[[Category:Level Design]][[Category:Level Design Tutorials]]
{{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.
To get a proper 3D perspective of your work, you will need to be able to control setting the 3D camera view.
Line 5: Line 4:
This can be done in two ways: You can either use the keyboard to navigate through your map, or you can rig 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==
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 descriped below to reset a new camera near the level. Eventaully the fade distance can be decreased/increased with the 1/2 keys, that may make the level easier to find.
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:
The basic keyboard controls are simple:
* To move your position, use the W, A, S, and D keys. These work like the default in-game steering, moving your position up, left, down and right, respectively.
* 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 up, left, down and right, respectively.
* To change the direction you are facing, click and hold the Left Mouse Button and you can look like ingame. Or alternatively use the arrow keys.
* To change the direction you are facing, 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:
* 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.
* Press the <code>Z</code> key to enter "mouselook" mode. This toggles between arrow keys and mouse control. Press <code>Z</code> 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.
* 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.
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==
== Creating a camera ==
[[Image:hammer_camera.jpg |thumb|left|100px| Select the camera.]]
[[Image:hammer_camera.jpg |thumb|left|100px| Select the camera.]]
[[Image:Hammer_top2dview2.jpg |thumb|right|400px| Create a camera by dragging its position.]]
[[Image:Hammer_top2dview2.jpg |thumb|right|400px| Create a camera by dragging its position.]]
Line 28: Line 27:
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 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.
* You can use the <code>PageUp</code> and <code>PageDown</code> 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.
* The last selected camera is restored when you save the map and open it later.


Line 40: Line 39:
Once you've learned the basics, here are some shortcuts for moving in the 2D views:
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.
* 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.
* Hold down <code>Space</code> 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 <code>1</code> through <code>0</code> (zero) keys zoom the window at different preset zoom levels.
* The + and - keys on can be used to zoom in and out.<br style="clear:both">
* The <code>+</code> and <code>-</code> keys on can be used to zoom in and out.<br style="clear:both">


==See Also==
== See also ==
[[Hammer Viewports]]
* [[Hammer Viewports]]


{{NavBar|Getting Started|Your First Map|Basic Construction}}
{{NavBar|Getting Started|Your First Map|Basic Construction}}
[[Category:Level Design]]
[[Category:Level Design Tutorials]]

Revision as of 07:29, 16 November 2007

To get a proper 3D perspective of your work, you will need to be able to control setting the 3D camera view.

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 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 1/2 keys, which may make it easier to find the level.

The basic keyboard controls are simple:

  • To move your position, use the W, A, S, and D keys. These work like the default in-game steering, moving your position up, left, down and right, respectively.
  • To change the direction you are facing, 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:

  • 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