2
0
Эх сурвалжийг харах

return defMat when no animation on joint

Nicolas Cannasse 9 сар өмнө
parent
commit
885a3040a5

+ 1 - 1
h3d/scene/Skin.hx

@@ -176,7 +176,7 @@ class Skin extends MultiMaterial {
 		if( j == null ) return null;
 		if( j == null ) return null;
 		if( additive )
 		if( additive )
 			return additivePose == null ? null : additivePose[j.index];
 			return additivePose == null ? null : additivePose[j.index];
-		return currentRelPose[j.index];
+		return currentRelPose[j.index] ?? j.defMat;
 	}
 	}
 
 
 	public function setJointRelPosition( name : String, pos : h3d.Matrix, additive = false ) {
 	public function setJointRelPosition( name : String, pos : h3d.Matrix, additive = false ) {