Physics2D: Add NearestBodyQuery

This commit is contained in:
Jérôme Leclercq
2017-03-01 17:40:12 +01:00
parent f22dd81d35
commit 5ebf125474
6 changed files with 101 additions and 4 deletions

View File

@@ -229,7 +229,10 @@ namespace Nz
cpSpace* space = m_world->GetHandle();
for (cpShape* shape : m_shapes)
{
cpShapeSetUserData(shape, this);
cpSpaceAddShape(space, shape);
}
cpBodySetMoment(m_handle, m_geom->ComputeInertialMatrix(m_mass));
}