From 5113fcaeddc73ad50be48d2291dbfcb399e6dae6 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Fri, 25 Apr 2025 14:44:15 +0200 Subject: [PATCH] Fix glTF reader not ignoring parent transforms for skinned meshes --- irr/src/CGLTFMeshFileLoader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irr/src/CGLTFMeshFileLoader.cpp b/irr/src/CGLTFMeshFileLoader.cpp index 87712595a..bd8356c91 100644 --- a/irr/src/CGLTFMeshFileLoader.cpp +++ b/irr/src/CGLTFMeshFileLoader.cpp @@ -426,7 +426,10 @@ void SelfType::MeshExtractor::addPrimitive( throw std::runtime_error("too many vertices"); // Apply the global transform along the parent chain. - transformVertices(*vertices, parent->GlobalMatrix); + // "Only the joint transforms are applied to the skinned mesh; + // the transform of the skinned mesh node MUST be ignored." + if (!skinIdx) + transformVertices(*vertices, parent->GlobalMatrix); auto maybeIndices = getIndices(primitive); std::vector indices;