Skip to content

Controls for your scene

For creatorsAdd-on 2.2.2+

A scene’s controls are its input map: a list of named actions, such as move, jump or fire, each with the keys, mouse buttons, touches, gamepad buttons and headset controls that work it. Characters and graphs listen for actions, never for keys, so one scene plays on a keyboard, a phone, a gamepad and in a headset. Players can rebind every action.

  1. Open the World tab of the Properties editor and expand Simulacrum, then Input.
  2. Press Add Action.
  3. Choose a Preset, or choose Custom and fill in Action and Bindings yourself. Except for the walk set, you can also pick one input from each of Gamepad, Headset and Wheel; each is added to the bindings.
  4. Press OK. The action joins the list.
Preset Action Bindings
Walk set (WASD + Space + Shift) moveX, moveZ, jump, run All four rows below
Move X (A / D) moveX keys:KeyA,KeyD
Move Z (S / W) moveZ keys:KeyS,KeyW
Jump (Space) jump keys:Space
Run (Shift) run keys:ShiftLeft/ShiftRight
Fire (F / left mouse) fire keys:KeyF ; mouse:left
Aim (right mouse) aim mouse:right

An action’s name is letters, digits and _, and starts with a letter. In the list, edit an action’s bindings in place, or press its X to remove it.

Each action is a scene property named input. and the action, such as input.jump, holding its bindings as text. You can also add one in Properties ▸ Scene ▸ Custom Properties, as a string.

An action’s bindings are one line of parts, separated by ;:

keys:ArrowLeft/KeyA,ArrowRight/KeyD ; touch:x ; pad:LeftX
Part Example What it does
keys: with one group keys:Space/Enter A button: any key in the group, separated by /, presses it
keys: with two groups keys:ArrowLeft/KeyA,ArrowRight/KeyD An axis, from −1 to 1: the first group pushes it down, the second up
mouse: mouse:left · mouse:right · mouse:middle A mouse button on the scene
touch:tap touch:tap A short touch: under 0.35 s, without sliding
touch:hold touch:hold Held while a finger is down
touch:x touch:x An axis: where the finger is across the screen, −1 at the left edge to 1 at the right
touch:joyX · touch:joyY touch:joyY- The phone’s floating joystick, under a thumb on the left half of the screen: across, or forward. A - at the end reverses it
pad: pad:South · pad:LeftX · pad:none Gamepad buttons and sticks (below). none: no gamepad binding at all
xr: xr:RightTrigger/A Headset controller buttons and sticks (below)
wheel: wheel:accel · wheel:shiftUp/b7 A steering wheel and pedals (below)
repeat: repeat:170,50 A held button presses again after 170 ms, then every 50 ms

Keys are named as the browser names them: KeyA to KeyZ, Digit0 to Digit9, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Space, Enter, ShiftLeft, ShiftRight, ControlLeft and so on. These names follow the key’s place on the keyboard, so KeyW is the same key on every layout.

In the Add Action dialog, type keys:, mouse:, touch: and repeat: parts into Bindings, and pick a gamepad, headset or wheel input from Gamepad, Headset and Wheel: the dialog adds each as a pad:, xr: or wheel: part. For more than one input of a kind, or a wheel button by its number, type the parts into Bindings instead, or onto the end of the action’s line in the Input list.

Gamepad buttons are named by their place on the pad: South is the bottom face button, then East, West and North.

Names What they are
South East West North The four face buttons
L1 R1 The shoulder buttons
L2 R2 The left and right triggers, read as far as they are pressed
Select Start · L3 R3 The two middle buttons · the sticks pressed in
DUp DDown DLeft DRight The d-pad
LeftX LeftY RightX RightY The sticks as axes. A - at the end reverses one
LeftUp LeftDown LeftLeft LeftRight The left stick pushed one way, as a button

When an action has no pad: part, it gets one from its name and keys, so every scene plays on a gamepad:

The action Gets
Two key groups: left and right The left stick across
Two key groups: up and down The left stick up and down
Named accel, thrust, gas The right trigger (R2)
Named brake, reverse · aim The left trigger (L2)
Named fire, shoot The right trigger (R2), and South too when its key is Space
Named jump, serve, drop, launch South
Named again, restart, pause, menu Start
Named swap, switch North
Named run, sprint L3 and L1
Bound to the arrow keys · Space · Enter · 1 to 4 The d-pad and stick · South · Start · South, East, West, North
Anything else The next free face button

Select is never given to an action: it opens the player’s menu.

Names What they are
LeftTrigger RightTrigger The triggers, as far as they are pressed
LeftGrip RightGrip The grips
LeftStickX LeftStickY RightStickX RightStickY The thumbsticks, or a touchpad under the thumb
LeftStickClick RightStickClick A stick or touchpad pressed in
X Y · A B The left face buttons · the right face buttons

When an action has no xr: part, its buttons come from its gamepad buttons: the right trigger becomes RightTrigger, the left trigger becomes LeftTrigger, South becomes A and East becomes B. The sticks stay the player’s, for walking and turning.

To give your scene the sticks, set the scene property input.xr.sticks to on. Every gamepad stick in your input map is then the same headset stick too, and walking with the sticks is off. An action can also take a stick by naming it, as in xr:LeftStickX.

LeftStickClick opens the player’s menu, RightStickClick is the glasses, and X and Y record takes. Leave those to the player.

A steering wheel and pedals work once the player sets them up on their Controls page. Bind an action to one of the wheel’s parts by its role: wheel:steer (an axis), wheel:accel, wheel:brake, wheel:clutch, wheel:shiftUp, wheel:shiftDown, wheel:handbrake and wheel:horn, or a button by its number, such as wheel:b7.

Three more scene properties, named after the action, change how it behaves:

Property Example What it does
input.<action>.type axis · button Makes it an axis or a button, whatever its bindings suggest
input.<action>.modifiers deadzone(0.12) curve(1.6) Shapes an axis, in order: deadzone(n) ignores small pushes, scale(n) multiplies, curve(n) makes small pushes finer, negate reverses it
input.<action>.trigger hold(0.35) When a button counts: hold(t) after it is held for t seconds; tap(t) once, on a release quicker than t; chord(other) only while another action is held; pulse(170,50) again and again while held

Actions the scene’s characters and vehicles listen for

Section titled “Actions the scene’s characters and vehicles listen for”
  • The player hero listens for moveX, moveZ, jump, run, fire, aim and swap. The Walk set preset gives it the first four. See The player hero.
  • Cars bring their own actions, from carAccel and carSteer to carLights and carHorn. Players can rebind them, and a scene can change one with a property of the same name, such as input.carHandbrake = keys:Space ; pad:South ; xr:B. See The cabin.
  • A vehicle’s tool, such as a forklift’s forks, gets a pair of keys for each of its moving parts. See Vehicle tools.

Players open the menu (Tab, the ≡ button, a gamepad’s Select, or the left stick pressed in, in a headset) and press Controls. It lists every action of your scene, with its current keys and its gamepad or headset controls. Pressing an action opens its page:

  • Keys, Pad and VR each listen for the next key, button or control the player presses, and keep it. An axis takes two keys: first its down way, then its up way.
  • Wheel appears when a wheel is connected.
  • Reset to the scene’s puts your bindings back.

Reset all bindings, pressed twice, clears every change. A player’s changes are kept in their browser, for your scene only. See Change a control.

  • Keys you bind are your scene’s. While an action that uses a key is active, the built-in walking no longer sees that key.
  • Some controls are the player’s. Players can’t bind Tab, Esc or a gamepad’s Select, or, in a headset, the sticks pressed in and X and Y. Leave them free in your bindings too.
  • A gamepad appears after a press. The browser shows a gamepad to the scene only after one of its buttons is pressed.
  • One gamepad. The scene reads the first standard gamepad. Any other device, such as a wheel, works only through its own setup on the player’s Controls page.