Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

docs(viewport): which button turns the eye, and which way a drag takes it

esengine2aa9b5186a2a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8dcd75071..8209dccb1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,13 @@ published separately; it ships inside the editor.
### Fixed
+- **A drag turns the view the way it grabs it.** Dragging the editor eye moved the
+ yaw one way and the pitch the other: a diagonal drag pulled the scene left while
+ pulling it down, because only the vertical half followed the pointer. Both halves
+ now grab the scene — the world turns the way the pointer moves and the eye goes
+ the other way, which is what a turntable orbit does everywhere else. The sign
+ convention lives in one function (`orbitAfterDrag`) that every drag door calls.
+
- **`tsc-editor` reported success with no editor to check.** `pnpm --filter` prints
"No projects matched the filters" and exits 0, so an uninitialised submodule left
the gate type-checking nothing and passing.
@@ -69,6 +76,13 @@ published separately; it ships inside the editor.
### Added
+- **Right-drag turns the editor eye.** It panned, like the middle button, so the
+ only way to look around a 3D scene was Alt-drag. Right-drag now turns a view that
+ has somewhere to turn to — a perspective one, or one already off head-on — and
+ keeps its pan on a flat 2D view, where turning is an accident rather than a
+ gesture. Middle-drag (and Space + left) still pans everywhere, Alt-drag still
+ turns anything. `viewportNavFor` is the whole button map, in one place.
+
- **Import settings are edited in batches.** Selecting several assets showed the
primary one's inspector, so "make every sprite in this folder nearest-filtered"
was one asset at a time. The Details panel now edits the whole asset selection
diff --git a/desktop b/desktop
index 7b49b61d7..6778866cf 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit 7b49b61d746b48ee9ade830bc8330c63ec5e4823
+Subproject commit 6778866cf7e59640da3a49bf332f0b2c1e58d983
diff --git a/docs/astro/src/content/docs/editor/viewport.mdx b/docs/astro/src/content/docs/editor/viewport.mdx
index a1437351f..b826354f5 100644
--- a/docs/astro/src/content/docs/editor/viewport.mdx
+++ b/docs/astro/src/content/docs/editor/viewport.mdx
@@ -6,7 +6,11 @@ The viewport is where you place and manipulate entities.
**Navigation**
-- **Pan** — drag with the middle or right mouse button.
+- **Pan** — drag with the middle mouse button (or hold **Space** and drag, for a trackpad).
+- **Turn** — drag with the **right** mouse button once the view is a spatial one
+ (perspective, or already turned), or **Alt-drag** from any view. A drag grabs the
+ scene: the world turns the way the pointer moves. On a flat 2D view right-drag
+ pans, as it always did — there is nothing to walk around.
- **Zoom** — scroll the mouse wheel (zooms toward the cursor).
- **Frame Selected** — press **F** to center and fit the selection.
diff --git a/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx b/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
index 66c4f5499..54982665d 100644
--- a/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
+++ b/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
@@ -6,7 +6,10 @@ description: "视口导航、变换 gizmo、对齐与分布、显示开关、Sce
**导航**
-- **平移** — 按住鼠标中键或右键拖动。
+- **平移** — 按住鼠标中键拖动(触控板可按住 **空格** 拖动)。
+- **转动视角** — 视角是空间性的(透视,或已经转过)时按住**右键**拖动;任何视角都可以
+ **Alt+拖动**。拖动是「抓住场景」:世界朝指针移动的方向转。在正对的 2D 视图里右键仍然
+ 是平移——那里没有可以绕着走的东西。
- **缩放** — 滚动滚轮(朝光标缩放)。
- **聚焦选中** — 按 **F** 把选中项居中并适配。