Merge pull request #29583 from Toshiwoz/master

Fix Vector3 slerp method by normalizing cross product
This commit is contained in:
Rémi Verschelde 2019-06-12 14:34:28 +02:00 committed by GitHub
commit 4db4b7a605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -224,7 +224,7 @@ Vector3 Vector3::slerp(const Vector3 &p_b, real_t p_t) const {
#endif
real_t theta = angle_to(p_b);
return rotated(cross(p_b), theta * p_t);
return rotated(cross(p_b).normalized(), theta * p_t);
}
real_t Vector3::distance_to(const Vector3 &p_b) const {