Fix incorrect transformation on imported blend shapes data from fbx file

#672
This commit is contained in:
Wojciech Figat
2021-12-07 13:22:33 +01:00
parent 5d12554548
commit c0bcb54044

View File

@@ -735,11 +735,9 @@ bool ProcessMesh(ImportedModelData& result, OpenFbxImporterData& data, const ofb
blendShapeData.Vertices[i].VertexIndex = i;
auto shapeVertices = shape->getVertices();
auto rootConvertRotation = data.RootConvertRotation;
for (int32 i = 0; i < blendShapeData.Vertices.Count(); i++)
{
auto delta = ToVector3(shapeVertices[i]) - mesh.Positions[i];
delta = rootConvertRotation * delta;
blendShapeData.Vertices[i].PositionDelta = delta;
}