Models/Collideables/etc. won't need a AABB component anymore, if it has a Model component. In addition, they should take rotation into account, i.e it doesn't have to be axis-aligned.

This commit is contained in:
William Moberg
2016-02-09 19:20:04 +01:00
parent eec59a40c8
commit 7140b740b5
6 changed files with 51 additions and 47 deletions
@@ -7,12 +7,6 @@ void FillOctreeSystem::Update(double dt)
void FillOctreeSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt)
{
if (!entity.HasComponent("AABB")) {
//Derive AABB from model.
if (!Collision::AttachAABBComponentFromModel(entity)) {
return;
}
}
boost::optional<EntityAABB> absoluteAABB = Collision::EntityAbsoluteAABB(entity);
if (absoluteAABB) {
m_Octree->AddDynamicObject(*absoluteAABB);