Moved quat to forward vector in math helper class

This commit is contained in:
Antoine Pilote
2023-07-09 23:51:32 -04:00
parent f66865c0ec
commit 2a6601a2db
3 changed files with 14 additions and 3 deletions

View File

@@ -6,3 +6,8 @@ Quat Nuake::QuatFromEuler(float x, float y, float z)
{
return Quat(Vector3(Rad(z), Rad(y), Rad(x)));
}
Vector3 Nuake::QuatToDirection(const Quat& quat)
{
return glm::rotate(glm::inverse(quat), glm::vec3(1.0, 0.0, 0.0));
}