Page 1 of 1
Not letting box2d physics resolve
Posted: Thu Mar 31, 2022 8:17 pm
by TheFriendlyFoe
I have a game, but I don't want box2d to resolve any of the collisions, I want to code my own resolutions to collisions. Is there a way I can turn off the physics between fixtures while still being able to get if 2 fixtures are touching?
Re: Not letting box2d physics resolve
Posted: Thu Mar 31, 2022 8:25 pm
by MrFariator
I think
bump.lua might suit your needs better.
Re: Not letting box2d physics resolve
Posted: Fri Apr 01, 2022 11:24 am
by TheFriendlyFoe
Thanks for the suggestion but the problem is I have a ton of not axis-aligned rectangles. I'm making a racing game and the tracks are make with many rectangles on the outside.
Re: Not letting box2d physics resolve
Posted: Fri Apr 01, 2022 1:18 pm
by TheFriendlyFoe
Ok I did some research and I think I found the solution: setting the fixtures to sensors. This is the simple answer for anyone else who needs it. You can do it by doing something like this:
fixture:setSensor(true)