correct offset matrix
parent
59b48fb960
commit
ccf2bce2b0
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue