1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Fix glTF reader not ignoring parent transforms for skinned meshes

This commit is contained in:
Lars Mueller
2025-04-25 14:44:15 +02:00
committed by Lars Müller
parent 0d414c44da
commit 5113fcaedd

View File

@@ -426,6 +426,9 @@ void SelfType::MeshExtractor::addPrimitive(
throw std::runtime_error("too many vertices"); throw std::runtime_error("too many vertices");
// Apply the global transform along the parent chain. // Apply the global transform along the parent chain.
// "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); transformVertices(*vertices, parent->GlobalMatrix);
auto maybeIndices = getIndices(primitive); auto maybeIndices = getIndices(primitive);