Implement Collision Mechanics
We'll go for swept AABB for collision detection and resolution, with a custom handler in the case of bullets, which need pixel-perfect precision.
-
late collision resolution (split already colliding objects) - [x] prevent lock when touching a wall -
swept collision resolution - [x] resolve bug with x != 0 || y != 0
- [x] movement shouldn't fail altogether when moving into a wall you're touching -
collision responses - [x] trigger callbacks for different collision types - [x] resolve as slide
,bounce
or whatever the object wants to do - [ ] bullets
Edited by Ondřej Kvapil