diff --git a/core/math/vector3.h b/core/math/vector3.h index b02fa599120..84477af9f39 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -193,7 +193,7 @@ real_t Vector3::distance_squared_to(const Vector3 &p_b) const { real_t Vector3::angle_to(const Vector3 &p_b) const { - return Math::acos(this->dot(p_b) / Math::sqrt(this->length_squared() * p_b.length_squared())); + return Math::atan2(cross(p_b).length(), dot(p_b)); } /* Operators */