Skip to content

Commit

Permalink
fix parenting
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfloogle committed Aug 17, 2024
1 parent 7fe6b41 commit dd97a66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ export fn gltf_skin_joints(gltf_id: f64, skin_id: f64) f64 {
var node = array_get(GLTF.Node, gltf.nodes, joint) orelse return -1;
var matrix = create_transform(node);
while (node.parent) |parent| {
if (parent == skin.skeleton) break;
node = array_get(GLTF.Node, gltf.nodes, node.parent) orelse return -1;
matrix = multiply_matrices(matrix, create_transform(node));
if (parent == skin.skeleton) break;
}
if (ibm_data) |data| {
const matrix_ptr = data[i * ibm_stride ..];
Expand Down

0 comments on commit dd97a66

Please sign in to comment.