Add invoking BoxVolume::OnBoundsChanged after transform changed

This commit is contained in:
Wojtek Figat
2021-01-18 15:00:35 +01:00
parent fdc8e371c4
commit 2bfcc15f66

View File

@@ -132,8 +132,10 @@ void BoxVolume::OnTransformChanged()
// Base
Actor::OnTransformChanged();
const auto prevBounds = _box;
OrientedBoundingBox::CreateCentered(Vector3::Zero, _size, _bounds);
_bounds.Transform(_transform.GetWorld());
_bounds.GetBoundingBox(_box);
BoundingSphere::FromBox(_box, _sphere);
OnBoundsChanged(prevBounds);
}