From 41135295350a1173d9d27f82694aa2fc09a2d1c2 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Mon, 7 Oct 2024 09:28:57 -0700 Subject: [PATCH] Assign the correct bone rest transform to nodes with matrix in GLTF --- modules/gltf/gltf_document.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 992075e980e..0a487430a36 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -613,12 +613,8 @@ Error GLTFDocument::_parse_nodes(Ref 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"];