From 847fb35aa7e6667f566a15be96a98a327dc615d3 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Tue, 8 Oct 2024 17:36:42 +0200 Subject: [PATCH] fix debug assertion in `create_labels` --- crates/viewer/re_space_view_spatial/src/ui.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/viewer/re_space_view_spatial/src/ui.rs b/crates/viewer/re_space_view_spatial/src/ui.rs index 04ef5a5c4b6c..0d08bf10893b 100644 --- a/crates/viewer/re_space_view_spatial/src/ui.rs +++ b/crates/viewer/re_space_view_spatial/src/ui.rs @@ -169,7 +169,7 @@ pub fn create_labels( // Closest last (painters algorithm) labels.sort_by_key(|label| { if let UiLabelTarget::Position3D(pos) = label.target { - OrderedFloat::from(-ui_from_world_3d.transform_point3(pos).z) + OrderedFloat::from(-ui_from_world_3d.project_point3(pos).z) } else { OrderedFloat::from(0.0) }