From 4ff43f2f72ccc211198a105f6652ceadb26becf1 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 27 Mar 2019 23:10:37 +0100 Subject: [PATCH] Sdk/DebugSystem: Fix collision 2D offset --- SDK/src/NDK/Systems/DebugSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDK/src/NDK/Systems/DebugSystem.cpp b/SDK/src/NDK/Systems/DebugSystem.cpp index 54295f611..f2175e559 100644 --- a/SDK/src/NDK/Systems/DebugSystem.cpp +++ b/SDK/src/NDK/Systems/DebugSystem.cpp @@ -377,7 +377,7 @@ namespace Ndk if (entity->HasComponent()) { const PhysicsComponent2D& entityPhys = entity->GetComponent(); - *offset = entityPhys.GetMassCenter(Nz::CoordSys_Global) - entityPhys.GetPosition(); // GetPosition already takes GetGeomOffset into account + *offset = entityPhys.GetMassCenter(Nz::CoordSys_Local) + entityCollision.GetGeomOffset(); } else *offset = entityCollision.GetGeomOffset();