Sdk/DebugSystem: Fix collision 2D offset
This commit is contained in:
@@ -377,7 +377,7 @@ namespace Ndk
|
|||||||
if (entity->HasComponent<PhysicsComponent2D>())
|
if (entity->HasComponent<PhysicsComponent2D>())
|
||||||
{
|
{
|
||||||
const PhysicsComponent2D& entityPhys = entity->GetComponent<PhysicsComponent2D>();
|
const PhysicsComponent2D& entityPhys = entity->GetComponent<PhysicsComponent2D>();
|
||||||
*offset = entityPhys.GetMassCenter(Nz::CoordSys_Global) - entityPhys.GetPosition(); // GetPosition already takes GetGeomOffset into account
|
*offset = entityPhys.GetMassCenter(Nz::CoordSys_Local) + entityCollision.GetGeomOffset();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*offset = entityCollision.GetGeomOffset();
|
*offset = entityCollision.GetGeomOffset();
|
||||||
|
|||||||
Reference in New Issue
Block a user