Quaternion vector rotation error. #209
This commit is contained in:
@@ -302,11 +302,11 @@ namespace detail
|
||||
detail::tvec3<T, P> const & v
|
||||
)
|
||||
{
|
||||
detail::tvec3<T, P> u(q.x, q.y, q.z);
|
||||
detail::tvec3<T, P> uv(glm::cross(u, v) * q.w);
|
||||
detail::tvec3<T, P> uuv(glm::cross(u, uv));
|
||||
detail::tvec3<T, P> const QuatVector(q.x, q.y, q.z);
|
||||
detail::tvec3<T, P> const uv(glm::cross(QuatVector, v));
|
||||
detail::tvec3<T, P> const uuv(glm::cross(QuatVector, uv));
|
||||
|
||||
return v + (uv + uuv) * static_cast<float>(2);
|
||||
return v + ((uv * q.w) + uuv) * static_cast<T>(2);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
|
||||
Reference in New Issue
Block a user