Open erikwatson opened 3 years ago
I have come to think that perhaps it is not a good idea to try and handle collision response at the "engine" level and instead let each game decide how it wants to handle the collision data when it gets it.
I've got a build of AABB working nicely in another project, but I will consider merging it into Bramble soon. It does 1, 2, and 3. It doesn't do dynamic rectangles vs other dynamic rectangles. It doesn't do arbitrary polygons or circles. The rectangles can't be rotated (it's AABB, baby!)
If we want rotation and arbitrary polygons when we'll need to implement SAT too. There's no need for that just yet.
Added a line vs cubic bezier curve function. It probably needs some tidying up to bring it in line with the rest of the api but it's there.
I'll add more later if I think I need them.
What is most important to me is that a player can collide with a tile map. I have a proof of concept of this somewhere, it works pretty nicely but I think the approach was wrong. Anyway, I'm probably going to need to do 1, 2 and 3 in order to get it working.
I think exposing the collision functions is probably useful, but what I really want is just for the user to be able to do something as simple as collide(hero, tilemap) and just have Bramble figure out how to do it. I'm not sure exactly how this will look but it needs doing.