From 010f3227bb7c77aec9c8a3de1f7cff32f68b6fc9 Mon Sep 17 00:00:00 2001 From: SamGu-NRX Date: Thu, 1 Oct 2026 14:49:25 -0500 Subject: [PATCH] ios: clear the live dots on a spatial reset A relocalization timeout restarts ARKit's world frame, but resetSpatialState kept the SurfaceDots field, so depth from the new frame fused into dots from the old one. Start over already clears both; the spatial reset now does the same. Greptile 4115037126 on #158. Co-Authored-By: Claude Opus 5.5 (1M context) --- ios/HouseScan/Runtime/ScanEngine.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/HouseScan/Runtime/ScanEngine.swift b/ios/HouseScan/Runtime/ScanEngine.swift index add53477d..460b16cdf 100644 --- a/ios/HouseScan/Runtime/ScanEngine.swift +++ b/ios/HouseScan/Runtime/ScanEngine.swift @@ -1123,6 +1123,9 @@ final class ScanEngine { // A fresh map: the old world frame is gone, so its anchors and planes are meaningless. live?.restart() coverage = nil + // The dot field lives in the old world frame too; kept, new depth would fuse into it. + liveDots.reset() + state.liveDots = .empty meterAnchorID.map { live?.removeAnchor($0) } meterAnchorID = nil meterPlaneSource = .detectedPlane