summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 14:11:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 14:11:09 +0000
commit85987b1e90569588233af5beb08f04aeb4fc4c4e (patch)
tree0cd4b12d7e0de4cb64f55d89fbce6b8c92ed5eee
parentFix vertical offset of curved rails (diff)
downloadilt-85987b1e90569588233af5beb08f04aeb4fc4c4e.tar.bz2
ilt-85987b1e90569588233af5beb08f04aeb4fc4c4e.tar.xz
ilt-85987b1e90569588233af5beb08f04aeb4fc4c4e.zip
Swap application of rotX and rotY
Makes more sense to ease pitch of vehicles on slopes in the direction of travel
-rw-r--r--gfx/gl/transform.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}