From 0a7696f26ae65ac211012daabbe6aa9d75922b18 Mon Sep 17 00:00:00 2001 From: Nova Date: Tue, 6 Feb 2024 11:30:58 -0500 Subject: [PATCH] fix(spatial/bounds): move proper center bounds --- src/nodes/spatial/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/nodes/spatial/mod.rs b/src/nodes/spatial/mod.rs index ec3752b0..4b3f4eb9 100644 --- a/src/nodes/spatial/mod.rs +++ b/src/nodes/spatial/mod.rs @@ -266,12 +266,11 @@ impl SpatialAspect for Spatial { let relative_spatial = relative_to.get_aspect::()?; let center = Spatial::space_to_space_matrix(Some(&this_spatial), Some(&relative_spatial)) .transform_point3([0.0; 3].into()); - let bounds = Bounds { - center, - dimensions: [0.0; 3].into(), - }; - bounds_grow_to_fit_box( - bounds, + let bounds = bounds_grow_to_fit_box( + Bounds { + center, + dimensions: [0.0; 3].into(), + }, this_spatial.get_bounding_box(), Some(Spatial::space_to_space_matrix( Some(&this_spatial),