From e20ddc83d8ae9dd0a1e50efcd6f62849deb60069 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 4 Mar 2024 21:53:28 +0100 Subject: [PATCH] Fix vehicle center of mass rotation used in wheels setup #2171 --- Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp b/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp index 496b9f057..0c77738f6 100644 --- a/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp +++ b/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp @@ -3469,7 +3469,8 @@ void* PhysicsBackend::CreateVehicle(WheeledVehicle* actor) Array> shapes; shapes.Resize(actorPhysX->getNbShapes()); actorPhysX->getShapes(shapes.Get(), shapes.Count(), 0); - const PxTransform centerOfMassOffset = actorPhysX->getCMassLocalPose(); + PxTransform centerOfMassOffset = actorPhysX->getCMassLocalPose(); + centerOfMassOffset.q = PxQuat(PxIdentity); // Initialize wheels simulation data PxVec3 offsets[PX_MAX_NB_WHEELS];