From 0e78312e95afc2cf0b8e84c557289a415ba4472a Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Wed, 2 Apr 2025 23:07:09 -0500 Subject: [PATCH] fix (?) rotation set the behaviour back to prior calcs, plus allow the desired scroll combo to work --- .../source/materials/processedShaderMaterial.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Engine/source/materials/processedShaderMaterial.cpp b/Engine/source/materials/processedShaderMaterial.cpp index 22e4b613d..17768ef38 100644 --- a/Engine/source/materials/processedShaderMaterial.cpp +++ b/Engine/source/materials/processedShaderMaterial.cpp @@ -942,20 +942,18 @@ void ProcessedShaderMaterial::_setTextureTransforms(const U32 pass) ? waveOffset * M_2PI : mMaterial->mRotPos[pass]; - MatrixF rotationMat(EulerF(0.0f, 0.0f, rotationAngle)); - Point3F pivotPoint( mMaterial->mRotPivotOffset[pass].x, mMaterial->mRotPivotOffset[pass].y, 0.0f); - - MatrixF finalRotationMat(true); - finalRotationMat.setColumn(3, pivotPoint); - finalRotationMat.mul(rotationMat); - finalRotationMat.setColumn(3, -pivotPoint); - + + MatrixF rotationMat = MatrixF(EulerF(0.0, 0.0, rotationAngle), Point3F(0.5, 0.5, 0.0)); + MatrixF test(true); + test.setColumn(3, pivotPoint); + rotationMat.mul(test); + rotationMat.displace(texMat.getPosition()); // Apply final rotation matrix - texMat.mul(finalRotationMat); + texMat = rotationMat; } // --- Scale Animation ---