Avoiding moving objects going into walls in bump.lua

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Gunroar:Cannon()
Party member
Posts: 1143
Joined: Thu Dec 10, 2020 1:57 am

Re: Avoiding moving objects going into walls in bump.lua

Post by Gunroar:Cannon() »

MrFariator wrote: Mon Mar 15, 2021 8:04 am I haven't had the chance to properly look through your code, but on line 262 in data/bullets.lua, is this right?

Code: Select all

function bullets.BouncyBullet.checkCollisiuon(item, other) -- "Collisiuon" instead of "Collision"
 -- ...
end
As far as I can tell, because of that typo you're using the default filter (as defined in entities/bullet.lua, in Bullet.checkCollision), so you're still using whatever the collision type for other resolves to, instead of hardcoding "slide"?
DANG IT. :rofl: :nyu:
You and p.gimeno are right, it seems it's from bounce,(I do think I left it like that intentionally in the actual project but forgot about it when making this testcase) :neko:
I say you don't because when it's slide the bug doesn't show(unless you tap on a metal block).
Anyway to fix that bounce bug?
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
pgimeno
Party member
Posts: 3674
Joined: Sun Oct 18, 2015 2:58 pm

Re: Avoiding moving objects going into walls in bump.lua

Post by pgimeno »

Gunroar:Cannon() wrote: Mon Mar 15, 2021 8:52 am Anyway to fix that bounce bug?
1) Report it to the creator (in GitHub or here) and hope for a fix. But the creator seems to be too busy lately.
2) Study the code and fix it yourself, then submit it as a PR.
3) Add your own pluggable collision response processor (Bump allows that).
4) Switch to another collision response, e.g. touch.
5) Switch to another collision library or make your own. I have made one but it doesn't support bouncing yet and it's currently unreleased.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests