Assign the correct bone rest transform to nodes with matrix in GLTF
This commit is contained in:
parent
db66bd35af
commit
4113529535
1 changed files with 1 additions and 5 deletions
|
@ -613,12 +613,8 @@ Error GLTFDocument::_parse_nodes(Ref<GLTFState> p_state) {
|
||||||
if (n.has("scale")) {
|
if (n.has("scale")) {
|
||||||
node->set_scale(_arr_to_vec3(n["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")) {
|
if (n.has("extensions")) {
|
||||||
Dictionary extensions = n["extensions"];
|
Dictionary extensions = n["extensions"];
|
||||||
|
|
Loading…
Reference in a new issue