Skip to content

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 typeHow it plays
WASD with MouseWASD 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 typeHow it looks
Third PersonBehind the character, orbiting, zooming, colliding with walls, swinging back behind the character as it walks
Top-down FocusedLooks down at the character and always follows it. Middle-drag rotates, the wheel zooms
Top-down FreeThe 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 ​

OptionWhat it doesDefault
Movement basisCharacter: 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 movesCharacter
Snap body to camera on lookCharacter 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 bodyoff
Secondary action triggerWhen the right-click action fires: Press, or on Release without drag (so a click acts and a drag looks)Press
Auto face overrides mouse lookWhen 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 thresholdPrevents the animation from flickering when moving diagonally0.7
Allow lock on, allow lock on switchTarget lock, and changing targets while lockedon
Target lock rotation speedHow fast the character turns to the locked target10
Auto face on attackThe character turns to its target when attackingon
Enable keyboard interactThe E key interactson
Fire aimed attack with primaryWith a bow or gun, holding the primary button while looking around fires the aimed attack at the crosshairon
Look sensitivity scaleThe feel of this preset relative to the player's setting1
Block input with window openThe 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 optionoff

Third Person camera: the options ​

OptionWhat it doesDefault
Vertical angle min / maxHow far down and up the camera can tilt-80 / 80
Allow manual orbitLeft-drag orbits the camera without turning the bodyon
Enable auto follow on movementThe camera swings behind the character while it walks (character basis only)on
Follow direction speedHow quickly it swings5
Collision enabled, collision layer, camera radius, collision smoothingThe camera pulls in when a wall is behind the character, using the Camera detection collision layeron, 0.3, 10
Look sensitivity scaleAs above1

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:

PairResult
Third person or top-down with WASDFine
Third person with RTSWarns: the camera's left-drag orbit is ignored (the RTS controller owns the left button)
Third person with point-and-click singleWarns: right-drag only tilts the view
A camera-relative controller with a custom camera that does not use the input managerWarns: 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 ​