1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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,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<u16> indices;