diff --git a/SDK/src/NDK/Components/GraphicsComponent.cpp b/SDK/src/NDK/Components/GraphicsComponent.cpp index f8b4e468d..f865e749b 100644 --- a/SDK/src/NDK/Components/GraphicsComponent.cpp +++ b/SDK/src/NDK/Components/GraphicsComponent.cpp @@ -277,7 +277,8 @@ namespace Ndk { Nz::Boxf localBox = boundingVolume.obb.localBox; Nz::Vector3f newPos = r.data.localMatrix * localBox.GetPosition(); - Nz::Vector3f newLengths = r.data.localMatrix * localBox.GetLengths(); + Nz::Vector3f newCorner = r.data.localMatrix * (localBox.GetPosition() + localBox.GetLengths()); + Nz::Vector3f newLengths = newCorner - newPos; boundingVolume.Set(Nz::Boxf(newPos.x, newPos.y, newPos.z, newLengths.x, newLengths.y, newLengths.z)); }