[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

#### 3.1.4.2 Movement Commands

The actual code for movement is a maze of twisty little subroutines, all alike, and this is reflected in the commands available.

There are several concepts in use in the movement commands.

- Movement in world coordinates.
- Movement relative to way the camera is facing.
- Movement relative to the camera's orientation, ie taking account of any rotation along the direction you are looking in.
- Acceleration and decceleration.

This has been implemented by having two modes - ``move_3d on'` and ``move_3d off'`. This affects the ``strafe'`, ``step'`, ``rotate'` and ``look'` commands which invoke commands prefixed with ``imm_'` when ``move_3d'` is on.

``move_3d'` is like Descent, as if you are piloting an air vehicle, and can yaw, pitch and roll.

Without ``move_3d'`, movement is like Quake, and you cannot tip your head left and right, only up and down.

Acceleration and maximum speed are configured in the Configuration file, but only affect the step (move in direction of view) and strafe (move perpendicular to direction of view) commands, not the rotation commands. See section Configuration Files.

`facenorth`
`facesouth`
`faceeast`
`facewest`
`facedown`
`faceup`

  Point in the specified absolute direction. Useful if you get lost or if you are not pointing quite level, since Walktest has a movement bug which means if you are not facing horizontally, you tend to drift forwards or backwards.

`turn [`b`]`

  Turn 180 from the direction you are facing.

The next section of commands work differently if ``move_3d'` is on. ``move_3D'` mode ignores gravity, and gives a full 3D capability, like Descent. The gravity control can be switched off even if ``move_3d'` is off. It is of limited use, as these commands are not bound to individual keys normally, and you don't really want to keep typing them into the console.

In 3D mode, they take a single step as described. In normal mode, they take a parameter giving the distance to move. Remember that status means this commands takes place as long as the keys are held down.

- `step_forward n` [`status-up`]
- `step_backward n` [`status-down`]
- `strafe_left n` [`status-alt-left`]
- `strafe_right n` [`status-alt-right`]
- `look_up n` [`status-pgup`]
- `look_down n` [`status-pgdn`]
- `rotate_left n` [`status-left`]
- `rotate_right n` [`status-right`]
- `jump` [`0`]

If ``do_gravity'` is enabled (the default) and ``on_ground'` is set, add ``cfg_jumpspeed'` to upward (y) component. In short, jump. And you can't jump in midair to keep going upwards.

`move3d [`3`]`

  Toggle between between pure 3D movement (Descent-like) and `comfortable' movement (Quake-like). The latter is now default. This basically affects the left and right arrow keys which now rotate the camera how you would expect it and also includes a gravity system. When you enable 3D movement the gravity system is also disabled, and the left and right arrow keys are like banking a plane left or right.

`do_gravity boolean [`8`]`

  Enable/disable gravity (enabled by default). If you disable gravity, you can't jump. You can use the ``i_up'` or ``i_down'` commands, but they are not bound to keys by default.

Movement

These take a pair. If first = 1, use Slow mode. If second = 1, use Fast mode. Both may be true, in which case slow is assumed. These commands are bound to movement keys. The `Control` key sets the Slow flag, and `Control-Shift` sets the Fast flag. There are key bindings for use with Slow and Fast, but not Normal speed.

- i_forward s f [`Control-UP`]
- i_backward s f [`Control-DOWN`]
- i_left s f [`Control-Alt-LEFT`]
- i_right s f [`Control-Alt-RIGHT`]
- i_up s f [`Control-Alt-UP`]
- i_down s f [`Control-Alt-DOWN`]

These four perform left or right rotation using either camera or world coordinates.

- i_rotleftc [`Control-LEFT`]
- i_rotleftw [`Control-Shift-Alt-LEFT`]
- i_rotrightc [`Control-RIGHT`]
- i_rotrightw [`Control-Shift-Alt-Right`]

These four perform rotation, left or right, around the X (horizontal) or Z (direction of view) axes.

- i_rotleftx [`Control-PGDN`]
- i_rotleftz [`Control-Alt-PGUP`]
- i_rotrightx [`Control-PGUP`]
- i_rotrightz [`Control-Alt-PGDN`]

`colldet boolean [`Shift-8`]`

  Enable/disable collision detection. This corresponds to the ``-colldet'` and ``-nocolldet'` command line options.

`freelook [`\`]`

  If freelook is enabled the mouse moves the camera around like in Quake. By default freelook is disabled, allowing you to move the mouse to point at things.

`inverse_mouse Boolean [```]`

  This changes the up and down operation of the mouse, so the mouse acts like a joystick when in freelook mode. Pull the mouse back to look up, push it forwards to look down.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ]

This document was generated using texi2html 1.76.