Collisions and Bounding Boxes
Hey folks! While I was debugging my new game, I found myself requiring to see the bounding boxes of my game objects, and also to better manage the collisions and intersections between them. I have made a toy plugin that does two things:
1. Draws a BBox around your object.
`collisions.draw(object, {tint: 0x00FF00}}`
2. Triggers a behaviour / function if two object collide:
`collisions.start(object1, object2, {onCollision: function () ... {})`
Here is a small video showing both functionalities. I remember our conversations about making it easier to debug as well, which `draw()` does.
https://www.loom.com/share/1660d3dda9b64d50a826fe8bae9a6805
Do you find it useful? Would this help debug your games? Would this help you have a better code but delegating the behaviours on collisions to the collisions plugin?
I hear you ๐
10d