From 33569901ba67321d394b03eebd885b8057ed8757 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Wed, 12 Jul 2023 22:50:28 -0400 Subject: [PATCH] Work --- Nuake/src/Core/Maths.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Nuake/src/Core/Maths.cpp b/Nuake/src/Core/Maths.cpp index 971339eb..27f21147 100644 --- a/Nuake/src/Core/Maths.cpp +++ b/Nuake/src/Core/Maths.cpp @@ -37,6 +37,8 @@ Quat Nuake::CreateFromAxisAngle(Vector3 axis, float angle) Quat Nuake::QuatFromEuler(float x, float y, float z) { + return Quat(Vector3(Rad(z), Rad(y), Rad(x))); + Quat q; float cr = cos(x * 0.5); @@ -56,5 +58,5 @@ Quat Nuake::QuatFromEuler(float x, float y, float z) Vector3 Nuake::QuatToDirection(const Quat& quat) { //return quat * Vector3(0, 0, -1); - return glm::rotate(glm::inverse(quat), glm::vec3(0.0, 0.0, 1.0)); + return glm::rotate(glm::inverse(quat), glm::vec3(-1.0, 0.0, 0.0)); } \ No newline at end of file