소스 검색

Fix Vector3 slerp method normalizing cross product

(cherry picked from commit 416a7d06ded6f19a7c44c793bc536e338a48eec8)
Toshiwo 6 년 전
부모
커밋
b56fa43090
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/math/vector3.h

+ 1 - 1
core/math/vector3.h

@@ -223,7 +223,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 {