Scene and objects
Add objects with + Add, move, rotate and scale them, navigate the viewport, and see what the Studio saves in scene.json.
On this page
Scene mode is where you edit your game's world. The viewport shows the live world, the Scene panel on the right lists every object in it, and what you change is saved to the project's scene.json, which the game loads wherever it runs.
The viewport and the Scene panel#
Click an object in the viewport to select it; the Scene panel follows. Click empty space to deselect. Selecting an object in the Scene panel selects it in the viewport too.
While you edit, the world shows as authored: the template's characters stand at their start points and no game menu is shown. The game camera is an object in the scene: select it to see a picture-in-picture preview of what it sees.
Moving the view#
| Input | What it does |
|---|---|
| Right mouse drag | Look around. Hold it and use W, A, S, D to fly, E to go up and Q to go down. |
| Right mouse + wheel | Change the fly speed (8 steps). |
| Shift / Ctrl or Alt | Faster (x3) / slower (x0.25) while flying, panning or dollying. |
| Alt + left mouse drag | Orbit around the point you're looking at. |
| Middle mouse drag | Pan. |
| Alt + right mouse drag, or the wheel | Dolly in and out. |
| F | Frame the selection. |
| Alt+G / Alt+J / Alt+H / Alt+K | Perspective / Top / Front / Left views (add Shift for Bottom, Back and Right). |
| Ctrl (or Cmd) + 1 to 9, then 1 to 9 | Save a camera bookmark, then go back to it. |
The Perspective ▾ menu at the top right of the viewport switches views and has Match game camera, which moves the view to where the game camera is. The gear menu next to it has a Camera speed slider, Frame selection, Frame the whole scene, and the Grid, Selection & gizmos, Game HUD in Scene and Frame Play to game resolution toggles.
Add an object#
Choose + Add in the viewport's top-left toolbar and pick what to add:
| Item | Adds |
|---|---|
| Cube | A box |
| Sphere | A ball |
| Plane | A flat square |
| Cylinder | A cylinder |
| Point Light | A light that shines in every direction |
| Empty | An object with no shape, useful as a marker |
The new object lands 6 metres in front of the scene camera, dropped onto the ground, and is selected so you can move it straight away. It appears in the Scene panel.
From a script or an agent, editor.scene.add {kind, name?, position?} does the same: kind is cube, sphere, plane, cylinder, light or empty, and position is [x, y, z]. It returns the new object.
Move, rotate and scale#
The transform tools sit in the same toolbar:
| Tool | Key | How to use it |
|---|---|---|
| Select | Q | Selection only. |
| Move | W | Drag an axis arrow, the centre square (moves along the ground) or the object itself. |
| Rotate | E | Drag a ring. |
| Scale | R | Drag an axis box, or the centre for uniform scale. |
- Hold Ctrl while dragging to snap: 0.25 m for moves, 15 degrees for rotation, 0.1x for scale.
- Press Esc during a drag to cancel it.
- Ctrl+Z or Cmd+Z undoes; Ctrl+Shift+Z or Cmd+Shift+Z redoes.
You can move any object, not only the ones you added: the template's player and character start points, the boxes the course is built from, the sun and so on. A moved start point or level box is moved in the game's own level, so the game plays with your change.
What scene.json saves#
The Studio saves the scene to scene.json, next to the project's neo.toml, 0.4 seconds after your last edit. It never saves during Play. The file has two lists:
| List | What's in it |
|---|---|
objects | The objects you added with + Add, in order: each one's name, kind, position (translation), rotation, scale and, for shapes, a color. |
world | Your moves of the game's own objects. Each entry names its target and the new transform. |
A world target is how the game finds the object again:
key:character:<i>for the template's character start points, andkey:box:<i>for its level boxes;name:<path>for anything else that has a name, such asname:Sun.
When the game starts, it builds its world, spawns your added objects and replays each move once it has built that object. The same file is used by the desktop Studio, the browser Studio and a published game, so your game plays as you edited it everywhere.
Scene commands#
| Command | What it does |
|---|---|
editor.scene.add | Adds an object (see above). |
editor.scene.file | Shows where the scene file is, how many times it has been saved and what's in it. |
editor.scene.save | Saves the scene now. |