Skip to content

Commit

Permalink
fix(spatial/bounds): move proper center bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
technobaboo committed Feb 6, 2024
1 parent 5f88cd7 commit 0a7696f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/nodes/spatial/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,11 @@ impl SpatialAspect for Spatial {
let relative_spatial = relative_to.get_aspect::<Spatial>()?;
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),
Expand Down

0 comments on commit 0a7696f

Please sign in to comment.