SL-20448 Fix for worn animesh corrupting octree bounding boxes.

meow-7.2.2
RunitaiLinden 2023-10-13 15:32:23 -05:00
parent 0d47ea31e3
commit 20f1ca9297
1 changed files with 2 additions and 2 deletions

View File

@ -261,11 +261,11 @@ void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXfor
LLVector3(mExtents[1].getF32ptr())
};
LLQuaternion backwardRotation = ~currentTransform.getRotation();
LLQuaternion backwardRotation = ~currentTransform.getWorldRotation();
for (LLVector3& corner : corners)
{
// Make coordinates relative to the current position
corner -= currentTransform.getPosition();
corner -= currentTransform.getWorldPosition();
// Rotate coordinates backward to the current rotation
corner.rotVec(backwardRotation);
// Expand root extents on the current corner