diff --git a/SDK/src/NDK/Components/CollisionComponent2D.cpp b/SDK/src/NDK/Components/CollisionComponent2D.cpp index be6106a45..912742b0e 100644 --- a/SDK/src/NDK/Components/CollisionComponent2D.cpp +++ b/SDK/src/NDK/Components/CollisionComponent2D.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -58,7 +59,16 @@ namespace Ndk NazaraAssert(entityWorld->HasSystem(), "World must have a physics system"); Nz::PhysWorld2D& physWorld = entityWorld->GetSystem().GetWorld(); - m_staticBody.reset(new Nz::RigidBody2D(&physWorld, m_geom)); + m_staticBody.reset(new Nz::RigidBody2D(&physWorld, 0.f, m_geom)); + + Nz::Matrix4f matrix; + if (m_entity->HasComponent()) + matrix = m_entity->GetComponent().GetTransformMatrix(); + else + matrix.MakeIdentity(); + + m_staticBody->SetPosition(Nz::Vector2f(matrix.GetTranslation())); + } /*!