Camera Glance Keys

From Armagetron
Revision as of 22:05, 22 August 2021 by Cadillac (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Note: This page describes the behavior of 0.3.0. Previous releases used a slightly different system.

Manual Camera Control

While the camera tries to show the areas of the grid that are most interesting to you, the camera can not always anticipate your wishes. Manual camera control permits you to adjust the perspective while playing to show the things that really matter.

The keys for manual camera control can be configured in

Main Menu/Player Setup/Player x Settings/Camera Input Configuration

What Is Glancing?

Glancing is the most common form of custom camera control. It causes the camera to face towards a specific direction and is controlled by the four glance keys "glance forward", "glance backward", "glance left" and - you guessed it - "glance right". Unless you changed them in the player options, the glance keys are the arrow keys.

Why Would I Want to Glance?

Glad you asked ;-). Using glancing, you can look in any direction, regardless of where you are driving to. You can glance backwards to check whether someone (friend or foe) is grinding your wall. You can glance right to check whether you or the opponent is ahead. You can watch what happens at a fortress while driving by or watch its interior while circling it.

The only disadvantage about glancing is that you might be so absorbed in the action around you that you forget to watch what might endanger your cycle ...

How Do I Glance?

Glancing is activated by pressing a glance key and maintained by keeping any glance key pressed.

For instance, pressing "glance left" for a while will show you the area left of your cycle until you release the key, upon which the automatic camera control takes over again.

More precisely, when you press a glance key, you "load" that key with a request to face towards a specific direction, and while you keep pressing the key, the request will be acted upon (if you keep more than one glance key pressed, the most recently pressed one is active).

The direction you request is the current view direction, snapped to the closest axis, rotated as specified by the glance key.

Note that glancing is completly independent of the cycle's driving direction. Therefore, there is nothing wrong with glancing over extended periods of time.

How Can I Configure Glancing?

Aside from adjusting the glance keys, glance behavior is controlled by the following options:

CAMERA_GLANCE_ANGULAR_VELOCITY
Controls how swiftly the camera rotates towards the requested facing. More precisely, this setting contains the angular velocity (if the camera's facing is perpendicular to the requested facing). Unit: Radians per second.
CAMERA_GLANCE_MODE
Controls how the camera rotates towards the requested facing. Possible values are:
0
The camera aproaches the requested facing with constant angular velocity.
1
The camera approaches the requested facing with angular velocity propotional to angle left to travel.
2
The camera approaches the requested facing with constant angular velocity if the angle left is larger than 90°, otherwise with angular velocity proportional to sin(angle).
any other setting
The camera always "jumps" instantly to its new position. Totally useless IMHO.
CAMERA_GLANCE_ANGULAR_VELOCITY_BONUS
Factor to CAMERA_GLANCE_ANGULAR_VELOCITY if CAMERA_GLANCE_MODE is set to 2 and the angle deft is larger than 90°

Since the smart camera offers a (in the dev's humble opinion) poor perspective when glancing, its location is configurable independently:

CAMERA_SMART_GLANCING_BACK
How far the camera is moved behind the cycle when glancing
CAMERA_SMART_GLANCING_HEIGHT
How far the camera is moved up. There is no pitch setting, the cycle always appears in the centre of the screen

Note that CAMERA_SMART_GLANCE_CUSTOM no longer exists. Those who prefer the old behavior are advised to use the preceeding options to simulate it.

Known Limitations

Due to axis snapping, if the current view direction is right between two axis, the glance directions are unspecified. Most automatic modes rarely reach that point on their own, but may do so if glancing has just been recently deactivated. We haven't found an easy way around that (as axis snapping is very useful).