mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
starting to look into collisions
This commit is contained in:
@@ -16,6 +16,8 @@ namespace BBM
|
||||
auto *mov = entity.tryGetComponent<MovableComponent>();
|
||||
if (!mov)
|
||||
return;
|
||||
mov->_velocity = BBM::Vector3f ();
|
||||
return;
|
||||
auto &pos = entity.getComponent<PositionComponent>();
|
||||
const auto &wallPos = wall.getComponent<PositionComponent>();
|
||||
auto diff = pos.position + mov->getVelocity() - wallPos.position;
|
||||
|
||||
Reference in New Issue
Block a user