From ccf2bce2b0cf90d51913cbbc8ed0f7b9edc9834b Mon Sep 17 00:00:00 2001 From: aoowweenn Date: Fri, 24 Mar 2017 15:45:50 +0800 Subject: [PATCH] correct offset matrix --- code/MMDImporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/MMDImporter.cpp b/code/MMDImporter.cpp index 80e966ca6..baac75605 100644 --- a/code/MMDImporter.cpp +++ b/code/MMDImporter.cpp @@ -324,8 +324,8 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel, auto pBone = new aiBone; const auto &pmxBone = pModel->bones[ii]; pBone->mName = pmxBone.bone_name; - aiVector3D pos(pmxBone.position[0], -pmxBone.position[1], -pmxBone.position[2]); - aiMatrix4x4::Translation(pos, pBone->mOffsetMatrix); + aiVector3D pos(pmxBone.position[0], pmxBone.position[1], pmxBone.position[2]); + aiMatrix4x4::Translation(-pos, pBone->mOffsetMatrix); auto it = bone_vertex_map.find(ii); if (it != bone_vertex_map.end()) { pBone->mNumWeights = it->second.size();