Not letting box2d physics resolve

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.
Post Reply
TheFriendlyFoe
Prole
Posts: 7
Joined: Fri Mar 18, 2022 11:42 am

Not letting box2d physics resolve

Post 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?
MrFariator
Party member
Posts: 548
Joined: Wed Oct 05, 2016 11:53 am

Re: Not letting box2d physics resolve

Post by MrFariator »

I think bump.lua might suit your needs better.
TheFriendlyFoe
Prole
Posts: 7
Joined: Fri Mar 18, 2022 11:42 am

Re: Not letting box2d physics resolve

Post 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.
TheFriendlyFoe
Prole
Posts: 7
Joined: Fri Mar 18, 2022 11:42 am

Re: Not letting box2d physics resolve

Post 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)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 7 guests