1
0
Fork 0

feat(collision): check for collision against blocks in the grid.

This commit is contained in:
Henrik Hautakoski 2025-09-14 22:37:54 +02:00
parent 324fd5af73
commit dab2570b76

View file

@ -15,6 +15,10 @@ func CheckShapeCollision(pos core.Vec2i8, shape *Shape, grid *Grid) bool {
if block.Y >= int8(grid.Height()) {
return true
}
if grid.At(byte(block.X), byte(block.Y)) != BLOCK_EMPTY {
return true
}
}
return false