From 0316d50ece15caef29c34e053dbf1df33bf418cc Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Sun, 29 Aug 2021 17:52:59 +0100 Subject: [PATCH] Improve Basis::get_quaternion error message The previous error message incorrectly suggested that any Basis could be fixed by calling get_rotation_quation() or orthonormalize(). This PR points out that only a valid rotation Basis can be fixed in this way. (cherry picked from commit d3a3b3aff376e759d821d38d9620b1c21c499e6b) --- core/math/basis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/basis.cpp b/core/math/basis.cpp index 97494d4be82..e95838a06a4 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -768,7 +768,7 @@ Basis::operator String() const { Quat Basis::get_quat() const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V_MSG(!is_rotation(), Quat(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() instead."); + ERR_FAIL_COND_V_MSG(!is_rotation(), Quat(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() if the Basis contains linearly independent vectors."); #endif /* Allow getting a quaternion from an unnormalized transform */ Basis m = *this;