Merge pull request #23885 from glaforte/bugfix/22848-attempt2

Avoids error messages when importing zero scale transforms in the COLLADA importer
This commit is contained in:
Rémi Verschelde 2018-11-22 23:30:19 +01:00 committed by GitHub
commit f673bd017d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1655,7 +1655,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
}
}
Quat q = xform.basis.get_rotation_quat();
Quat q = Math::is_equal_approx(xform.basis.determinant(), 0) ? Quat() : xform.basis.get_rotation_quat();
Vector3 s = xform.basis.get_scale();
Vector3 l = xform.origin;
@ -1705,7 +1705,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform;
Quat q = xform.basis.get_rotation_quat();
Quat q = Math::is_equal_approx(xform.basis.determinant(), 0) ? Quat() : xform.basis.get_rotation_quat();
Vector3 s = xform.basis.get_scale();
Vector3 l = xform.origin;