fix(spatial/bounds): move proper center bounds
This commit is contained in:
@@ -266,12 +266,11 @@ impl SpatialAspect for Spatial {
|
|||||||
let relative_spatial = relative_to.get_aspect::<Spatial>()?;
|
let relative_spatial = relative_to.get_aspect::<Spatial>()?;
|
||||||
let center = Spatial::space_to_space_matrix(Some(&this_spatial), Some(&relative_spatial))
|
let center = Spatial::space_to_space_matrix(Some(&this_spatial), Some(&relative_spatial))
|
||||||
.transform_point3([0.0; 3].into());
|
.transform_point3([0.0; 3].into());
|
||||||
let bounds = Bounds {
|
let bounds = bounds_grow_to_fit_box(
|
||||||
|
Bounds {
|
||||||
center,
|
center,
|
||||||
dimensions: [0.0; 3].into(),
|
dimensions: [0.0; 3].into(),
|
||||||
};
|
},
|
||||||
bounds_grow_to_fit_box(
|
|
||||||
bounds,
|
|
||||||
this_spatial.get_bounding_box(),
|
this_spatial.get_bounding_box(),
|
||||||
Some(Spatial::space_to_space_matrix(
|
Some(Spatial::space_to_space_matrix(
|
||||||
Some(&this_spatial),
|
Some(&this_spatial),
|
||||||
|
|||||||
Reference in New Issue
Block a user