From 54fb20d343d0156165fe84d499e9b9853f7d36d8 Mon Sep 17 00:00:00 2001 From: gianlucafiore <50465150+gianlucafiore@users.noreply.github.com> Date: Fri, 16 Oct 2026 11:13:03 -0300 Subject: [PATCH] fix(visual): anchor Extension and OTRACK guides to acquired ray direction --- src/app/view/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/view/mod.rs b/src/app/view/mod.rs index 37f166fe2..021f666e1 100644 --- a/src/app/view/mod.rs +++ b/src/app/view/mod.rs @@ -935,11 +935,17 @@ bg={bg_ms:.1}ms n={view_count}" // both are drawn — one guide alone hides what the point is (#1313). let otrack_lines: Vec<(iced::Point, iced::Point)> = match otrack_proj { Some((view_rot, eye, ob)) => { - let a = ost_project(tab.last_cursor_world, view_rot, eye, ob); self.otrack_active .into_iter() .chain(self.otrack_cross) - .filter_map(|(base, _dir)| { + .filter_map(|(base, dir)| { + // Draw the acquired geometrical ray, not the line + // from its origin to the moving cursor. The latter + // rotates slightly as the pointer moves away from + // the exact ray, making the Extension guide appear + // to slide across its acquired endpoint. + let direction = dir.try_normalize()?; + let a = ost_project(base + direction, view_rot, eye, ob); let b = ost_project(base, view_rot, eye, ob); (b.x.is_finite() && b.y.is_finite()