fix staticmorph actually propagating

This commit is contained in:
austin 2022-04-28 21:51:51 -04:00
parent 61ea9733fc
commit c94ad0911c
2 changed files with 5 additions and 4 deletions

View File

@ -63,10 +63,10 @@
{
"attributeId" : "TorsoHeight",
"type" : "bone",
"subtype" : "scalez",
"primaryBone" : "Bone",
"minValue" : 0.8,
"maxValue" : 1.2
"subtype" : "offy",
"primaryBone" : "UpperTorso",
"minValue" : -0.2,
"maxValue" : 0.2
}
],
"movementSystems" : [

View File

@ -401,6 +401,7 @@ public class Model {
Matrix4f bone_matrix = new Matrix4f(n.transform);
if(staticMorph != null && staticMorph.getBoneTransforms(n.id) != null){
bone_matrix.mul(staticMorph.getBoneTransforms(n.id).getTransform());
n.transform.mul(staticMorph.getBoneTransforms(n.id).getTransform());
}
bone_matrix.mul(target_bone.inverseBindPoseMatrix);
bone_matrix = new Matrix4f(globalInverseTransform).mul(bone_matrix);