Controller & Camera ​
How the player sees and moves through the world is made of two swappable parts:
- A controller decides what the player means: WASD to walk, a click to move or attack, a key to jump, how the character turns.
- A camera decides what the player sees: orbit, zoom, follow, lock-on.
They are kept apart on purpose, so you can combine them: a third-person camera with WASD, a top-down camera with point-and-click. You choose and tune each on its own tab of the Gameplay Config: Game Settings > Gameplay Config > Controller and > Camera. The demo uses a third-person camera with WASD and mouse.
The types ​
| Controller type | How it plays |
|---|---|
| WASD with Mouse | WASD walks, the mouse looks, left-click selects, right-click attacks or interacts, E interacts, a lock-on key targets |
| Point and Click (single) | Click the ground to walk there; one character |
| Point and Click (RTS) | Click to command the party, with drag-box selection |
| Camera type | How it looks |
|---|---|
| Third Person | Behind the character, orbiting, zooming, colliding with walls, swinging back behind the character as it walks |
| Top-down Focused | Looks down at the character and always follows it. Middle-drag rotates, the wheel zooms |
| Top-down Free | The same, but the camera can be panned freely with the keyboard when the controller does not use WASD to move |
The tabs ​
Each tab has a Type dropdown with the types above and, under it, the settings of that type in sections (the options are listed below). The logic is kept in the Gameplay Config itself: change a setting and the game uses it, there is nothing to choose and nothing else to save. Choosing another type gives the settings of that type at their defaults.
The game uses a copy of what is in the config, so what happens during play (angles, locks) never changes your settings.
Coming from presets
Older versions kept the controller and the camera as presets (files in src/data/controller_logic/) that the Gameplay Config pointed at. The first time you open the tabs, whatever the config pointed at is copied into the config. The preset files are no longer used: you can delete them. If your change of controller seemed to do nothing, that was why: the old editor changed a preset, while the one the game used was chosen in the Gameplay Config.
WASD with Mouse: the options ​
| Option | What it does | Default |
|---|---|---|
| Movement basis | Character: W walks the way the character faces, and right-drag turns the body (the camera follows behind). Camera: W walks away from the camera, both drags orbit the camera, and the body turns to face the way it moves | Character |
| Snap body to camera on look | Character basis: when right-drag look starts after the camera was orbited away, the body snaps to where the camera faces. Off: the camera eases back behind the body | off |
| Secondary action trigger | When the right-click action fires: Press, or on Release without drag (so a click acts and a drag looks) | Press |
| Auto face overrides mouse look | When an ability asks the player to face a target while the player holds right-mouse look: the ability wins (on) or the mouse wins (off) | on |
| Direction stability threshold | Prevents the animation from flickering when moving diagonally | 0.7 |
| Allow lock on, allow lock on switch | Target lock, and changing targets while locked | on |
| Target lock rotation speed | How fast the character turns to the locked target | 10 |
| Auto face on attack | The character turns to its target when attacking | on |
| Enable keyboard interact | The E key interacts | on |
| Fire aimed attack with primary | With a bow or gun, holding the primary button while looking around fires the aimed attack at the crosshair | on |
| Look sensitivity scale | The feel of this preset relative to the player's setting | 1 |
| Block input with window open | The player ignores the keys and the mouse of the game while a window is open (the keys that open and close windows still work). All controllers have this option | off |
Third Person camera: the options ​
| Option | What it does | Default |
|---|---|---|
| Vertical angle min / max | How far down and up the camera can tilt | -80 / 80 |
| Allow manual orbit | Left-drag orbits the camera without turning the body | on |
| Enable auto follow on movement | The camera swings behind the character while it walks (character basis only) | on |
| Follow direction speed | How quickly it swings | 5 |
| Collision enabled, collision layer, camera radius, collision smoothing | The camera pulls in when a wall is behind the character, using the Camera detection collision layer | on, 0.3, 10 |
| Look sensitivity scale | As above | 1 |
Every camera has Zoom with window open: whether the wheel and the zoom keys zoom while a window is open (on for the third person camera, off for the top-down cameras).
Every camera also has the Automatic Shake options (shake on a hard landing, shake on a big hit; both off by default): see Camera effects.
The top-down cameras have their own zoom, angle and nameplate-scaling options (the camera tilts more steeply as it zooms out, and nameplates shrink with distance).
Pairings ​
Not every pair works equally. The Controller and Camera tabs show warnings under the settings for a pair that would ignore something:
| Pair | Result |
|---|---|
| Third person or top-down with WASD | Fine |
| Third person with RTS | Warns: the camera's left-drag orbit is ignored (the RTS controller owns the left button) |
| Third person with point-and-click single | Warns: right-drag only tilts the view |
| A camera-relative controller with a custom camera that does not use the input manager | Warns: nothing will orbit |
The warnings are advice, not a lock: the controller wins any conflict.
The player's settings ​
How fast the mouse turns the view is the player's setting, not the preset's: Mouse sensitivity, the X and Y fine-tuning and invert are in Game Settings. The controller and camera only hold their relative feel (Look sensitivity scale). Two options of the Gameplay Config (Party Management) tune the whole input: Look drag threshold (how many pixels a press must move to count as a drag instead of a click, 10) and Log input routing (prints where each click went, for finding a UI element that swallows clicks).
Mouse buttons and the action bar ​
An action bar slot can be bound to a mouse button (the left and right buttons as attacks in an action game). A slot is read before the controller, so a button taken by a slot is not also a click or a mouse look. Choose a type that does not claim the button, or put the slot on another one. The whole setup is in Action bars and keybinds; the scene that draws the bar is Action bar.
Clicks that do not reach the world ​
If clicks do nothing in your game, a full-screen UI node is probably catching them. In your own interface scenes, set mouse_filter to Ignore on roots, containers and overlays, and to Stop on panels and buttons. See the advanced page.
See also ​
- Gameplay Config, Collision Layers.
- How the camera and controller are built, including how to write your own type.