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", "attributeId" : "TorsoHeight",
"type" : "bone", "type" : "bone",
"subtype" : "scalez", "subtype" : "offy",
"primaryBone" : "Bone", "primaryBone" : "UpperTorso",
"minValue" : 0.8, "minValue" : -0.2,
"maxValue" : 1.2 "maxValue" : 0.2
} }
], ],
"movementSystems" : [ "movementSystems" : [

View File

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