adding unit test and constructor for collusion components without callbacks

This commit is contained in:
Bluub
2021-05-31 15:26:35 +02:00
parent 47aac95801
commit 761eaabddb
4 changed files with 53 additions and 32 deletions
@@ -25,6 +25,8 @@ namespace BBM
std::max(posA.getY(), posA.getY() + col.getBoundY()),
std::max(posA.getZ(), posA.getZ() + col.getBoundZ())};
for (auto &other : _wal.scene->getEntities()) {
if (&other == &entity)
continue;
auto &colB = entity.getComponent<CollisionComponent>();
auto &posB = other.getComponent<PositionComponent>();
Vector3f minB = { std::min(posB.getX(), posB.getX() + colB.getBoundX()),