Skip to content

Commit

Permalink
DynamicBones: temp disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVgr committed Feb 11, 2025
1 parent 41797ec commit bf3d401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions h3d/prim/ModelDatabase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class ModelDatabase {
}

function loadDynamicBonesConfig( input : ModelDataInput, data : Dynamic) {
//! Temp disable dynamic joints
return;

var c : Array<Dynamic> = Reflect.field(data, DYN_BONES_CONFIG);
if (c == null || input.skin == null)
return;
Expand Down
3 changes: 1 addition & 2 deletions h3d/scene/Skin.hx
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ class Skin extends MultiMaterial {
newWorldPos += dynJoint.speed * hxd.Timer.dt;

// Stiffness (shape keeper)
var parentMovement = currentAbsPose[j.parent.index].getPosition() - currentAbsPose[dynJoint.parent.index].getPosition();
expectedPos = dynJoint.relPos.multiplied(currentAbsPose[dynJoint.parent.index]).getPosition() + parentMovement;
expectedPos = dynJoint.relPos.multiplied(currentAbsPose[dynJoint.parent.index]).getPosition();
newWorldPos.lerp(newWorldPos, expectedPos, dynJoint.stiffness);

// Slackness (length keeper)
Expand Down

0 comments on commit bf3d401

Please sign in to comment.