fix(viewer): keep offset door hit targets reachable from both sides - #978
Merged
Merged
Conversation
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: e964d661-f473-4e4c-906a-634776021000 |
Aymericr
marked this pull request as ready for review
September 30, 2026 02:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A door positioned away from its host wall can leave its invisible opening hit target behind the wall collision surface. Clicking from that side then selects the wall despite the visible opening.
Resolve the hit target from the host wall's zero-offset opening placement and express its horizontal correction in the door's rotated coordinates. This follows straight, curved and justified walls, including effective wall thickness. Visible frames, panels and the resolved floor height retain their authored placement. Unhosted and roof-hosted doors retain their existing behavior; reused targets reset after offset or parent changes. Frameless opening outlines follow the corrected opening position.
Validation: 119 focused tests / 1,456 assertions pass across eleven files, including actual wall collision rays from both sides, positive and negative offsets, flipped doors, rotated and curved walls, both wall justifications, compound rotations and mounted mesh reuse. The curved-wall follow-up reproduces eight failures before correction. Current-main legacy-load and zone-deletion controls also pass. Core/viewer TypeScript builds, formatting checks and both CI jobs pass. Independent architecture and regression reviews found no blocker.
Note
Medium Risk
Changes invisible selection raycast geometry for wall-hosted doors with Z offset; behavior is heavily tested but affects core picking/interaction paths.
Overview
Fixes selection when a door is offset from its host wall: the invisible cutout raycast proxy now stays centered on the wall opening (zero Z offset) while frames and panels keep their authored offset.
resolveOpeningCutoutProxyDepthbecomesresolveOpeningCutoutProxy, returning depth plus an optional placement center fromgetOpeningWallPlacementwith Z cleared;syncDoorCutoutapplies that correction in the door mesh’s local space (including compound rotation). Unhosted doors, roof segments, and zero offset are unchanged; the proxy resets when offset or parent changes.Adds
door-cutout-proxy.test.tswith raycast, curved/justified wall,DoorSystemlive-update, mesh reuse, and sliding-door visual bounds coverage.Reviewed by Cursor Bugbot for commit 53c6f2e. Bugbot is set up for automated code reviews on this repo. Configure here.