From 356e874050e5ad5af87b04a2bb01ce34a86640bb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 13 Nov 2023 00:17:11 +0000 Subject: Send position and rotation matrix to GPU separately --- game/vehicles/railVehicle.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'game/vehicles/railVehicle.cpp') diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp index 1ed904d..6e6e18f 100644 --- a/game/vehicles/railVehicle.cpp +++ b/game/vehicles/railVehicle.cpp @@ -14,15 +14,18 @@ RailVehicle::RailVehicle(RailVehicleClassPtr rvc) : RailVehicleClass::Instance {rvc->instances.acquire()}, rvClass {std::move(rvc)}, location {[this](const BufferedLocation * l) { - this->get()->body = l->getTransform(); + this->get()->body = l->getRotationTransform(); + this->get()->bodyPos = l->position(); }}, bogies {{ {[this](const BufferedLocation * l) { - this->get()->front = l->getTransform(); + this->get()->front = l->getRotationTransform(); + this->get()->frontPos = l->position(); }, Position3D {0, rvClass->wheelBase / 2.F, 0}}, {[this](const BufferedLocation * l) { - this->get()->back = l->getTransform(); + this->get()->back = l->getRotationTransform(); + this->get()->backPos = l->position(); }, Position3D {0, -rvClass->wheelBase / 2.F, 0}}, }} -- cgit v1.2.3