fix(editor): wall-item placement & floorplan polish#450
Conversation
Polish pass on the placement/interaction overhaul. Five fixes: - Item-on-item rotation box: the cursor box held the host-local yaw instead of world yaw, so it diverged from the item by the host's rotation when stacked on another item (fine on the floor). The box now derives world yaw from the mesh/host quaternion in both the R/T handler and the move-start sync. - 2D floorplan move now respects the snapping mode (parity with 3D): grid quantization only in grid mode, alignment guides only in lines/magnetic mode; Shift/Alt no longer hard-bypass. Item move also plays the move "tick" SFX on any resolved-position change, like the 3D move. - Wall-side item footprint side: the 2D footprint depth offset extended toward the wall (centerLocalZ -depth/2) instead of into the room, mirroring the item across the wall; flipped to +depth/2. Aligned the undefined-side anchor to the 3D convention (front +1 / else -1). - 3D placement preview side: the wall-side preview bounds + base plane used a -Z (into-wall) convention; flipped to +Z (into-room) to match the body and the fixed 2D footprint. The 2D live preview during a 3D wall placement now publishes the plan rotation (wall angle + item yaw) instead of the world cursor yaw, which was pi off on a wall face and flipped the footprint to the far side. - Cmd/Ctrl+R no longer rotates/flips the selected node (it reaches the browser reload); guard added to the global selected-node handler and the 2D move overlay. Verified: core/editor/nodes tsc, biome, editor 162/0 + nodes 292/0 tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba464ef. Configure here.
| // The box lives in building-local space while the mesh is parented to the host | ||
| // item, so add the host's world yaw: the box must track the item's true | ||
| // orientation, not its host-local `rotation[1]`. | ||
| cursorGroupRef.current.rotation.y = newRotationY + surfaceWorldY |
There was a problem hiding this comment.
Item-surface live yaw desync
Medium Severity
When placing items on other items, the 2D floorplan preview's rotation was out of sync with the 3D preview. The 3D box correctly incorporated the host item's world rotation, but useLiveTransforms published only the item's host-local rotation, causing the 2D footprint to appear mis-rotated until refreshed.
Reviewed by Cursor Bugbot for commit ba464ef. Configure here.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |


What does this PR do?
Polish pass on the placement/interaction overhaul (follow-up to #169). Five fixes across the placement coordinator, 2D floorplan, and keyboard handling:
centerLocalZ) extended toward the wall instead of into the room, laying the box across the wall onto the far side. Flipped-depth/2→+depth/2; also aligned theundefined-side anchor to the 3D convention.-Z) convention, and the 2D live preview during a 3D wall placement consumed the 3D world cursor yaw (π off on a wall face), flipping the footprint to the far side. Preview now uses the into-room (+Z) convention and publishes the plan rotation.!metaKey && !ctrlKeyguard to the global selected-node handler and the 2D move-overlay flip, so the browser reload comes through.Each was validated live in the editor across several rounds before landing.
How to test
bun dev, open a project with walls.Screenshots / screen recording
n/a — verified live; happy to record a clip if useful.
Checklist
bun devbun checkto verify)mainbranchFollow-up (not in this PR)
Doors/windows share the same legacy 2D-move snapping path (
door/window/floorplan-move.ts) and would benefit from the same mode-driven fix as #2 — left out to keep this scoped to the reported items.🤖 Generated with Claude Code
Note
Medium Risk
Touches wall-side coordinate conventions and live transform math across placement, floorplan rendering, and move sessions; regressions could show wrong footprints or snapping, but scope is editor interaction rather than auth or persistence.
Overview
Follow-up polish on placement and 2D/3D parity: wall-side items now use an into-room +Z convention everywhere the plan footprint and 3D preview bounds are built (depth offset,
front/backthickness sign, and placement wireframes), fixing mirrored 2D footprints and wrong-side live previews during 3D wall placement. The placement coordinator also publishes plan-space yaw for wall live transforms and derives world yaw for items on rotated hosts so green boxes track stacked/rotated items.2D floorplan item moves respect the global snapping mode like 3D (grid vs magnetic alignment, not Shift/Alt-only), and the registry move overlay plays the grid-snap tick when the resolved position changes. Cmd/Ctrl+R is left to the browser in the global rotate handler and the 2D move flip handler instead of rotating/flipping the selection.
Reviewed by Cursor Bugbot for commit ba464ef. Bugbot is set up for automated code reviews on this repo. Configure here.