Skip to content

Commit

Permalink
Assign the correct bone rest transform to nodes with matrix in GLTF
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Oct 7, 2024
1 parent db66bd3 commit 4113529
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/gltf/gltf_document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,8 @@ Error GLTFDocument::_parse_nodes(Ref<GLTFState> p_state) {
if (n.has("scale")) {
node->set_scale(_arr_to_vec3(n["scale"]));
}

Transform3D godot_rest_transform;
godot_rest_transform.basis.set_quaternion_scale(node->transform.basis.get_rotation_quaternion(), node->transform.basis.get_scale());
godot_rest_transform.origin = node->transform.origin;
node->set_additional_data("GODOT_rest_transform", godot_rest_transform);
}
node->set_additional_data("GODOT_rest_transform", node->transform);

if (n.has("extensions")) {
Dictionary extensions = n["extensions"];
Expand Down

0 comments on commit 4113529

Please sign in to comment.