3D Editor Controls - X-Hax/sa_tools GitHub Wiki

This page lists default camera controls for 3D editors in SA Tools, as well as instructions on how to change them.

Basic Camera Movement

Camera Look. Hold the Middle Mouse Button and move the mouse cursor to look around (camera pan/rotation).

Camera Move. Hold Shift + Middle Mouse Button and move the mouse cursor to move camera position.

Camera Zoom. Hold CTRL + Middle Mouse Button and move the mouse cursor vertically to zoom in and out.

Camera Adjustments

Change Camera Mode. Press X to alternate between Normal and Orbit camera modes.

Change Camera Speed. Press Numpad + and Numpad - to increase or decrease camera speed. Press Numpad 5 to reset camera speed to default.

Reset Camera Position. Press E to set camera position to X 0, Y 0, Z 0.

Reset Camera Rotation. Press R to reset camera rotation to default.

Zoom to Target. Press Z to zoom the camera onto the selected object.

Other Actions

Change Render Mode. Press N or F3 to switch between normal, vertex only and wireframe renreding modes.

Delete. Press Delete to delete selected items.

For a complete list of actions and hotkeys, open Editor Preferences and click the Control Options tab.

Configuring Controls

You can customize all actions that have configurable hotkeys. Each action can have a main key, an alternative key and a modifier. If a modifier doesn't exist, the action will trigger when you press the main key or the alternative key. If a modifier exists, the action will only trigger when both the modifier and the main or alternative key are pressed. To change keys, select the action you want to modify, click on the field for the key you would like to change and press the key you want to assign. image

Camera Modifier Setting

Older versions of 3D editors in SA Tools used a "tethered" control scheme, where all camera controls required a "main" camera key to be held. To use this scheme, select the "main" camera action for the Camera Modifier setting, and then set the "main" key as the modifier for other camera actions. For example, if you want Zoom and Look actions to depend on the key used for the Move action, set the Camera Move key as the modifier for Camera Zoom and Camera Look, and set Camera Modifier to Move.

Example based on the old control scheme for SA Tools

Camera Move: Main Key is Middle Mouse Button, Alternative Key and Modifier are disabled.

Camera Look: Main Key is Shift (Menu / Alt in older versions), Modifier is Middle Mouse Button.

Camera Zoom: Main Key is Control, Modifier is Middle Mouse Button.

Developer Notes

The text below was copied as-is from the previous version of this page.

For those who want to contribute code to the toolkit, especially those who want to use the keybinding system in new editors or update the existing editors, we will now cover the input system from a technical implementation perspective.

Action Mapping List

ActionMappingList is responsible for storing a list of action to input mappings. In addition to being able to instantiate an empty new list and construct an arbitrary one via the ActionKeyMappings<> List, it can serialize and deserialize action mappings to disk.

Action Input Collector

The ActionInputCollector is an event-emitting system that you can subscribe to whenever you'd like to know when actions have changed state. To be notified when an Action has either started or released, subscribe to the OnActionStart and OnActionRelease events respectively.

Driving The Input Collector

Due to architectural limitations, the input collection does not automatically hook into the editor inputs. Therefore you will need to feed the input collector yourself. To do so, call the KeyDown and KeyUp methods whenever you'd like to register a key press or clear event.