38 posts / 1 project
Code, art and music artisan.
Day 50: Minkowski-based collision detection bug?
3 years, 8 months ago
I'm trying to validate my article on collision detection by implementing all of the example code. I found something I'm pretty sure is a bug. Althogh not serious (especially for HH's case), I'd like to have my example code in the article correct and just want to confirm (in case I'm not missing something).
To be concrete, I'm taking about Day 50, handmade.cpp, method MovePlayer, excerpt starting at line 416:
On the last 4 lines, we should be adding (ceiled) half of EntityTileWidth/EntityTileHeight to the MinTileX/MinTileY/MaxTileX/MaxTileY. Is that correct?