From 85987b1e90569588233af5beb08f04aeb4fc4c4e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Feb 2021 14:11:09 +0000 Subject: Swap application of rotX and rotY Makes more sense to ease pitch of vehicles on slopes in the direction of travel --- gfx/gl/transform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/gl/transform.cpp b/gfx/gl/transform.cpp index b67bfaf..b7230f7 100644 --- a/gfx/gl/transform.cpp +++ b/gfx/gl/transform.cpp @@ -11,7 +11,7 @@ Transform::GetModel() const const auto rotX = glm::rotate(rot.x, glm::vec3(1.0, 0.0, 0.0)); const auto rotY = glm::rotate(rot.y, glm::vec3(0.0, 1.0, 0.0)); const auto rotZ = glm::rotate(rot.z, glm::vec3(0.0, 0.0, 1.0)); - const auto rotMat = rotX * rotY * rotZ; + const auto rotMat = rotY * rotX * rotZ; return posMat * rotMat * scaleMat; } -- cgit v1.2.3