View Navigation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(cleanup)
Line 1: Line 1:
{{otherlang2|ru=View_Navigation:ru|zh-cn=View_Navigation:zh-cn|de=View_Navigation:de}}
{{otherlang2
| ru = View Navigation:ru
| zh-cn = View Navigation:zh-cn
| de = View Navigation:de
}}


{{first room menu}}
{{first room menu}}


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.
Moving the camera is vital if you want to be able to see what you are doing. Hammer allows you to '''navigate manually with the keyboard and/or mouse''', and to '''switch between several cameras in different locations'''.


==Keyboard/mouse navigation==
{{tip|If you haven't created any brushes yet, you can use the origin mark of the map (the red, blue and green lines that you start at) for something to move around.}}


'''Simple Navigation'''
== Navigation ==


To navigate through your map using keyboard & mouse navigation, select the '''Camera tool''' [[Image:hammer_camera.png|28px]] from the left hand menu.  You can navigate using the {{key|W}}{{key|A}}{{key|S}}{{key|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. Alternatively, you can left or right click in the camera view window to look around (left click) or dolly the camera position (right click).
=== 3D views ===


'''MouseLook Mode'''
You can navigate through a 3D view with {{key|W}}{{key|A}}{{key|S}}{{key|D}} and the arrow keys: WASD are forward/backward/strafe as they are in-game, while the arrow keys turn your view. The scroll wheel can be used to give you a speed boost forwards or backwards.


* Press the {{key|Z}} key to enter "mouselook" mode. This toggles between arrow keys and mouse control. Press {{key|Z}} again to exit this mode and return to regular mouse control.
If you want to look around with the mouse, you can do so by selecting the {{hammer camera}} from the left-hand menu. Now you can spin the view by dragging with the left button, pan it by dragging with the right, and strafe by holding down both at once.
* 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.
{{tip|Press {{key|Z}} to enter or leave mouselook mode, which does not require you to hold down LMB.}}


== Creating a camera ==
=== 2D views ===
[[Image:hammer_camera.jpg |thumb|left|100px|Camera tool]]
[[Image:Hammer_top2dview2.jpg |thumb|right|300px|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.
You can pan across a 2D view using the arrow keys or scroll bars (if enabled), or by holding {{key|Space}} and dragging with the left mouse button.


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.
To magnify, you can scroll the mouse wheel, use {{key|+}}{{key|-}} (on the keypad!), or press {{key|1}} through to {{key|0}}.


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.
{{tip|Holding down {{key|ctrl}} in combination with {{key|+}}{{key|-}} or the mouse wheel will synchronise all 2D views to the same scale.}}


* You can use the {{key|PageUp}} and {{key|PageDown}} keys to switch between any created cameras, if you've made more than one in the map.
You can also use the Magnify tool [[File:Hammer magnify.png|28px|link=]] with left or right click.
* The last selected camera is restored when you save the map and open it later.


=={{clr}}Moving in the 2D views==
== Creating a camera ==
[[Image:hammer_magnifytool.jpg|thumb|right|100px|Magnify tool]]


You can use the '''Magnify tool''' [[Image:hammer_magnify.png|28px]] to zoom in and zoom out of the 2D viewports. First select the '''Magnify''' icon from the icon bar. Left-click in a 2D viewport to increase the magnification, and right-click to decrease the magnification.
To set up cameras, select the {{hammer camera}} from the left-hand list of icons.


There are other ways to magnify:
Click and drag your mouse in a 2D view to create the camera, as shown in the image below. The 3D view will snap to the new camera, and the 2D windows will display your camera as a blue circle with a line leading from it.


# Your mouse's scroll wheel can change the zoom level in all of the viewports: Forward will zoom in and backwards will zoom out.
[[File:Hammer top2dview2.jpg|thumb|none|300px|Create a camera by dragging out its position]]
# Hold down {{key|Space}} and the left mouse button to pan in 2D views.
 
# The {{key|1}} through {{key|0}} keys zoom the window at different preset zoom levels.
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 tail in the same manner. The 3D view will update whenever you release the mouse button.
# The {{key|+}} and {{key|-}} keys zoom in and out.
 
Hold {{key|Shift}} to create multiple cameras. Use {{key|PageUp}} and {{key|PageDown}} to switch between them and {{key|Delete}} to remove the active one.


== See also ==
== See also ==
* [[Hammer Viewports]]
* [[Hammer Viewports]]
* [[Hammer Camera Tool]]


{{Navbar|Getting Started|Your First Map|Basic Construction}}
{{Navbar|Getting Started|Your First Map|Basic Construction}}

Revision as of 05:55, 22 February 2010

Template:Otherlang2

Moving the camera is vital if you want to be able to see what you are doing. Hammer allows you to navigate manually with the keyboard and/or mouse, and to switch between several cameras in different locations.

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

Navigation

3D views

You can navigate through a 3D view with WASD and the arrow keys: WASD are forward/backward/strafe as they are in-game, while the arrow keys turn your view. The scroll wheel can be used to give you a speed boost forwards or backwards.

If you want to look around with the mouse, you can do so by selecting the Camera tool Hammer camera.png from the left-hand menu. Now you can spin the view by dragging with the left button, pan it by dragging with the right, and strafe by holding down both at once.

Tip.pngTip:Press Z to enter or leave mouselook mode, which does not require you to hold down LMB.

2D views

You can pan across a 2D view using the arrow keys or scroll bars (if enabled), or by holding Space and dragging with the left mouse button.

To magnify, you can scroll the mouse wheel, use +- (on the keypad!), or press 1 through to 0.

Tip.pngTip:Holding down ctrl in combination with +- or the mouse wheel will synchronise all 2D views to the same scale.

You can also use the Magnify tool Hammer magnify.png with left or right click.

Creating a camera

To set up cameras, select the Camera tool Hammer camera.png from the left-hand list of icons.

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

Create a camera by dragging out its position

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 tail in the same manner. The 3D view will update whenever you release the mouse button.

Hold Shift to create multiple cameras. Use PageUp and PageDown to switch between them and Delete to remove the active one.

See also