summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2021-08-29 17:52:59 +0100
committerlawnjelly <lawnjelly@gmail.com>2021-08-30 07:26:25 +0100
commitd3a3b3aff376e759d821d38d9620b1c21c499e6b (patch)
treef01b2ba89dca1cff835aee44e10ad85d4435bc02
parent2a40a58182d399994b60928f19fb83119898677f (diff)
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.
-rw-r--r--core/math/basis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index b5e25fb837..330d676d10 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -763,7 +763,7 @@ Basis::operator String() const {
Quaternion Basis::get_quaternion() const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!is_rotation(), Quaternion(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quaternion() or call orthonormalized() instead.");
+ ERR_FAIL_COND_V_MSG(!is_rotation(), Quaternion(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quaternion() or call orthonormalized() if the Basis contains linearly independent vectors.");
#endif
/* Allow getting a quaternion from an unnormalized transform */
Basis m = *this;