Jasoco wrote:Expanding on that, maybe detect collisions (But not resolve) with other polygonal shapes.
I don't doubt it's possible, but frankly, I lack the motivation or energy to implement or maintain that. I am not a super-mathy guy. I have been programming bump for several years, and people still find bugs - even if it's got boxes only. The code size would increase significantly in size, complexity, and errors. The interface would be less simple too.
Jasoco wrote:I mean I guess I could pile HardonCollider on top of Bump and use HC for hitboxes and Bump for platforming. If I had to. I would understand why you wouldn't want to put it in Bump for that very reason.
If you are going to do a single new type (i.e. circle vs box) then you could use bump as a broad phase detection (with the circle inside a bump box) and then implement your own stuff.
Code: Select all
local _,_,cols,len = world:move(item, goalX, goalY)
for i=1,len do
if cols[i].overlaps and collidesAsACircle(item, cols[i].other) then
-- do something here
end
end
Notice though that this strategy will only work for "overlap"-type collisions. If you get a tunnelling collision (i.e. the ball is moving so fast it goes completely through a wall in a single frame) you would have to use something different and more complex (probably as complex as bump).
If you are doing something more complicated, with polygons etc, I would *not* use bump at all. I would recommend just using hardoncollider.