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:
@@ -5,11 +5,6 @@
|
||||
|
||||
void TriggerSystem::UpdateComponent(EntityWrapper& triggerEntity, ComponentWrapper& cTrigger, double dt)
|
||||
{
|
||||
// The trigger *should* have a bounding box, or something, to test against so it can be triggered.
|
||||
// If it doesn't, add one as big as the model for now, then size can be modified in editor if necessary.
|
||||
if (!triggerEntity.HasComponent("AABB")) {
|
||||
Collision::AttachAABBComponentFromModel(triggerEntity);
|
||||
}
|
||||
boost::optional<EntityAABB> triggerBox = Collision::EntityAbsoluteAABB(triggerEntity);
|
||||
if (!triggerBox) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user