Fix transform scaling applying to nested objects when drawing

#1796 #1350
This commit is contained in:
Wojtek Figat
2024-02-20 23:55:06 +01:00
parent e5cfd872b2
commit 9a21cfd092
13 changed files with 51 additions and 30 deletions

View File

@@ -335,4 +335,12 @@ public:
// Calculates the world matrix for the given transformation instance rendering.
void GetWorldMatrix(const Transform& transform, Matrix& world) const;
// Applies the render origin to the transformation instance matrix.
FORCE_INLINE void GetWorldMatrix(Matrix& world) const
{
world.M41 -= Origin.X;
world.M42 -= Origin.Y;
world.M43 -= Origin.Z;
}
};