mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 10:31:15 +00:00
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 d3a3b3aff3)
This commit is contained in:
parent
0da326c8b3
commit
0316d50ece
1 changed files with 1 additions and 1 deletions
|
|
@ -768,7 +768,7 @@ Basis::operator String() const {
|
||||||
|
|
||||||
Quat Basis::get_quat() const {
|
Quat Basis::get_quat() const {
|
||||||
#ifdef MATH_CHECKS
|
#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
|
#endif
|
||||||
/* Allow getting a quaternion from an unnormalized transform */
|
/* Allow getting a quaternion from an unnormalized transform */
|
||||||
Basis m = *this;
|
Basis m = *this;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue