CompoundShape works, i.e parent child physics :)

Center of mass is still bugged.
This commit is contained in:
ViktorLjung
2014-04-06 19:00:58 +02:00
parent 1d0747076f
commit a880e7f3e6
9 changed files with 196 additions and 162 deletions
+9
View File
@@ -56,6 +56,15 @@ EntityID World::GetEntityParent(EntityID entity)
return it == m_EntityParents.end() ? 0 : it->second;
}
EntityID World::GetEntityBaseParent(EntityID entity)
{
EntityID parent = GetEntityParent(entity);
if (parent == 0)
return entity;
else
return GetEntityBaseParent(parent);
}
bool World::ValidEntity(EntityID entity)
{
return m_EntityParents.find(entity) != m_EntityParents.end();