Partial fix

This commit is contained in:
Antoine Pilote
2023-07-11 00:39:09 -04:00
parent 39caaeee41
commit cc1b3237a5
3 changed files with 6 additions and 4 deletions

View File

@@ -4,10 +4,11 @@ using namespace Nuake;
Quat Nuake::QuatFromEuler(float x, float y, float z)
{
return Quat(Vector3(Rad(x), Rad(y), Rad(z)));
return Quat(Vector3(Rad(z), Rad(y), Rad(x)));
}
Vector3 Nuake::QuatToDirection(const Quat& quat)
{
return quat * Vector3(0, 0, -1);
//return quat * Vector3(0, 0, -1);
return glm::rotate(glm::inverse(quat), glm::vec3(-1.0, 0.0, 0.0));
}