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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user