Skip to content

Commit

Permalink
added getJointRelPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Nov 20, 2024
1 parent 07bc22f commit 7950d06
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions h3d/scene/Skin.hx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ class Skin extends MultiMaterial {
return skinData;
}

public function getJointRelPosition( name : String, additive = false ) : Null<h3d.Matrix> {
var j = skinData.namedJoints.get(name);
if( j == null ) return null;
if( additive )
return additivePose == null ? null : additivePose[j.index];
return currentRelPose[j.index];
}

public function setJointRelPosition( name : String, pos : h3d.Matrix, additive = false ) {
var j = skinData.namedJoints.get(name);
if( j == null ) return;
Expand Down

0 comments on commit 7950d06

Please sign in to comment.