correct offset matrix

pull/1212/head
aoowweenn 2017-03-24 15:45:50 +08:00
parent 59b48fb960
commit ccf2bce2b0
1 changed files with 2 additions and 2 deletions

View File

@ -324,8 +324,8 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
auto pBone = new aiBone; auto pBone = new aiBone;
const auto &pmxBone = pModel->bones[ii]; const auto &pmxBone = pModel->bones[ii];
pBone->mName = pmxBone.bone_name; pBone->mName = pmxBone.bone_name;
aiVector3D pos(pmxBone.position[0], -pmxBone.position[1], -pmxBone.position[2]); aiVector3D pos(pmxBone.position[0], pmxBone.position[1], pmxBone.position[2]);
aiMatrix4x4::Translation(pos, pBone->mOffsetMatrix); aiMatrix4x4::Translation(-pos, pBone->mOffsetMatrix);
auto it = bone_vertex_map.find(ii); auto it = bone_vertex_map.find(ii);
if (it != bone_vertex_map.end()) { if (it != bone_vertex_map.end()) {
pBone->mNumWeights = it->second.size(); pBone->mNumWeights = it->second.size();