Learn/Perspective

Perspective

One world, seen two ways. Work in the free 3D view or flatten it onto a 2D plane, and switch between perspective and orthographic projection, without converting a single part.

Time8 min readLevelBeginnerUpdatedUpdated Sep 2026

01Overview

One World, Two Views

In Eustress, 2D is a way of looking at a Space, not a different kind of Space. The same parts, the same physics, the same files on disk are there whether you orbit them in 3D or lay them out flat in 2D. Nothing is exported, converted or duplicated when you switch, so you can sketch a floor plan in 2D, tumble into 3D to check the heights, and drop straight back to the plan.

Info
Two independent switches

The view has a dimension (3D or 2D) and a projection (perspective or orthographic). 3D can use either projection. 2D is always orthographic, because a flat working plane needs sizes that read true.

The Three Views

3D Perspective

3D Perspective

The default. Orbit, look and fly; distance shrinks things the way your eye does.

3D Orthographic

3D Orthographic

Still free to orbit, but parallel: elevations, plans and measured drawings.

2D

2D

Locked to one axis plane. Pan and zoom only; depth becomes layer order.

02Projection

Perspective vs Orthographic

A camera turns the 3D world into a flat image by casting rays. Perspective casts them from a single point, like an eye or a lens, so the same part looks smaller the further away it is. Orthographic casts them parallel, so a one-meter part is the same size on screen at any depth.

Perspectivenear: largefar: smallOrthographicsame sizesame size
Perspective rays spread from one point, so distance shrinks things. Orthographic rays run parallel, so a part measures the same on screen at any depth.
UsePerspectiveOrthographic
Judging how a space feelsYesNo
Aligning parts along an axisHardEasy
Comparing sizes by eyeMisleadingExact
Plans, elevations, sectionsNoYes
2D layouts and side viewsNoYes

Parallel rays change the sky too. Every pixel looks the same way, so the sky behind an orthographic view is one color, the sky straight ahead. There is no aerial haze, sun disk or star field, so parts keep their true colors at any zoom.

An Enum, Not a Boolean

Some tools expose orthographic as an on/off flag on the camera. Eustress runs on Bevy, where projection is a component holding one of two lenses, and each lens carries its own settings: a field of view for perspective, a view size for orthographic. A flag cannot hold both, and it leaves no room for a third kind of projection later.

Rust (Bevy)
// The camera's projection is an enum component.
enum Projection {
    Perspective(PerspectiveProjection),   // fov, near, far
    Orthographic(OrthographicProjection), // view size, near, far
    Custom(CustomProjection),             // anything else
}

// Orthographic in meters: show 24 m of the world, top to bottom.
Projection::Orthographic(OrthographicProjection {
    scaling_mode: ScalingMode::FixedVertical { viewport_height: 24.0 },
    ..OrthographicProjection::default_3d()
})

The Camera object in the Explorer mirrors that shape. It has a Projection property (Perspective or Orthographic) next to FieldOfView for the perspective lens and OrthographicSize (the visible height, in meters) for the orthographic one, plus ViewMode for 3D or 2D.

One Zoom for Both

Every camera orbits a pivot, the point in the middle of the screen. The orthographic view height is derived from the distance to that pivot, so one number sets the zoom in both projections:

Math
view height = 2 x distance x tan(field of view / 2)

distance 20 m, field of view 70 deg  ->  view height 28.0 m

That height is exactly how tall the pivot plane looks in perspective. So the thing you are looking at keeps its size when the projection changes, and framing a selection with F fits it in either projection.

The Seamless Switch

Switching projection is animated as a dolly zoom. The field of view narrows while the camera backs away, so the object at the center of the screen holds its size while everything around it flattens. When perspective has flattened out, true orthographic takes over. Going back plays the same move in reverse.

Tip
It anchors on what you are looking at

Before going orthographic, the editor finds whatever sits under the center of the screen and anchors the zoom there. A wall two meters away keeps its size, even if the orbit point had drifted far behind it while you were flying.

032D

Entering 2D

Press Alt+2, or click 2D in the Perspective control at the top right of the viewport. The camera turns onto an axis plane and flattens to orthographic in one motion. Alt+3 returns you to the 3D view and projection you left, centered on wherever the 2D view was panned to.

If you are already looking along an axis (Top, say), 2D keeps that plane. Otherwise it uses the plane you last worked in, and the XY plane the first time. XY with +Y up and depth as draw order is the same convention Bevy's own 2D renderer uses, so 2D content lines up one to one.

Working Planes

PlaneViewLooks alongTypical use
XYFront / BackZSide views, side-scrollers, elevations
XZTop / BottomYFloor plans, maps, top-down layouts
YZRight / LeftXEnd elevations, cross-sections

Change plane from the Perspective menu, or with the view keys while in 2D: Num 2 for XY, Num 8 for XZ, Num 6 for YZ. Hold Ctrl for the opposite side.

Navigating

2D has no rotation, so every gesture is a pan or a zoom:

Input3D perspective3D orthographic2D
Right-dragLook aroundOrbit the pivotPan
Middle-dragPanPanPan
Alt + left-dragOrbitOrbitPan
WheelFly toward cursorZoom about cursorZoom about cursor
W / SFly forward / backZoom in / outPan up / down
A / DStrafePanPan left / right
Q / EDown / upDown / upZoom out / in

Pans in orthographic and 2D are one to one: the point you grab stays under the cursor. Keyboard speeds follow the zoom, so the view moves at the same pace across a bolt or a city.

Building in 2D

  • Dragging slides a part across the plane. Its depth, which is its layer, never changes, and grid snap works in the plane.
  • Inserting drops the new part at the center of the view, on the working plane.
  • The grid lies on the working plane, and its spacing follows the zoom in powers of ten. Parts in front of the plane cover it and its lines cross parts behind it, so you can tell which side of the plane a part is on. Seen from above, it lies on top of the floor.
  • Gizmos keep a constant size on screen, and the handle pointing straight at you stays out of the way of the ones you can drag.

04Controls

The Perspective Control

The Perspective control lives in the viewport's tab bar, beside the Space tab, so it never covers the scene. The 2D | 3D switch changes dimension. The button beside it names what is on screen (User Perspective, Top Orthographic, XY Plane) with the visible height when orthographic, and opens the Perspective menu:

  • Projection: Perspective or Orthographic, with a field-of-view slider for perspective
  • View: the six axis views. In 2D these pick the working plane
  • Frame All: fit the whole scene

The same choices sit in the View menu under Perspective.

Shortcuts

KeysAction
Alt+22D view
Alt+33D view
5 or Num 5Toggle perspective / orthographic (3D)
Num 8, Num 2, Num 6, Num 4Top, Front, Right, Left (in 2D: the working plane)
Ctrl + the sameBottom, Back, Left, Right
Num .Frame all
FFrame the selection

All of them can be rebound in Keyboard Shortcuts, under Camera.

Camera Properties

Select the Camera in the Explorer to edit the view as properties:

PropertyValuesNotes
ViewMode3D, 2D2D locks the view to an axis plane
ProjectionPerspective, OrthographicFixed to Orthographic in 2D
OrthographicSizemetersVisible height of the orthographic view
FieldOfViewdegreesVertical, for the perspective lens

05Agents & Files

Actions over MCP

Every view change is an editor action, so an AI agent drives it the same way a keypress does, through the invoke_action tool of the MCP server:

MCP
{ "tool": "invoke_action", "arguments": { "action": "ViewMode2D" } }

// Also: ViewMode3D, ViewPerspectiveToggle,
//       ViewTop, ViewFront, ViewSideLeft, ViewSideRight

Per-Space Memory

A Space remembers the view it was last worked in, so a 2D project opens in 2D. The choice lives in a small file next to the Space's other editor state, and it changes only when the mode does, never as you pan or zoom:

.eustress/view.toml
# The Perspective this Space opens in. Written by the editor.
mode = "2D"
projection = "Orthographic"
plane = "Front"

06What's Next

Native 2D Content

Today, 2D work uses the same parts as 3D, and images are placed as flat quads (the Image class), which is why they look right in both views. Bevy also ships a dedicated 2D renderer (Camera2d, Sprite, Mesh2d) built for tens of thousands of sprites. Because the 2D view already follows Bevy's 2D convention, that renderer can stack on top of it as a second camera with a matching projection, and sprites will register exactly against parts.

2D at Runtime

2D is an editor view today. Next come a Play mode that follows the character along the working plane, physics that keeps bodies on that plane, and the same projection settings exposed to scripts, so a 2D experience plays in 2D.

Sketch it flat. Check it in 3D. Never convert a thing.

Loading Eustress Engine...