summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicle.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-11-16 00:07:48 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-16 00:07:48 +0000
commitb7fadd730a78671a0eaf55c36df24c04661ef2c3 (patch)
treea9d5bce62b3c6e42008d7e0f637665aa97b73764 /game/vehicles/railVehicle.cpp
parentDon't write null value for pointers (diff)
downloadilt-b7fadd730a78671a0eaf55c36df24c04661ef2c3.tar.bz2
ilt-b7fadd730a78671a0eaf55c36df24c04661ef2c3.tar.xz
ilt-b7fadd730a78671a0eaf55c36df24c04661ef2c3.zip
Swap y,z axis
This was a pain... but all the coords make much more sense now and a lot of mystery negation has disappeared.
Diffstat (limited to 'game/vehicles/railVehicle.cpp')
-rw-r--r--game/vehicles/railVehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp
index a2373e7..aea7f8c 100644
--- a/game/vehicles/railVehicle.cpp
+++ b/game/vehicles/railVehicle.cpp
@@ -21,6 +21,6 @@ RailVehicle::move(const Train * t, float & trailBy)
const auto & b2Pos = bogies[1] = t->getBogiePosition(t->linkDist, trailBy += rvClass->wheelBase);
const auto diff = glm::normalize(b2Pos.pos - b1Pos.pos);
location.pos = (b1Pos.pos + b2Pos.pos) / 2.F;
- location.rot = {-vector_pitch(diff), vector_yaw(diff), 0};
+ location.rot = {vector_pitch(diff), vector_yaw(diff), 0};
trailBy += 0.6F + overhang;
}