Not letting box2d physics resolve
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 7
- Joined: Fri Mar 18, 2022 11:42 am
Not letting box2d physics resolve
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?
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: Not letting box2d physics resolve
I think bump.lua might suit your needs better.
-
- Prole
- Posts: 7
- Joined: Fri Mar 18, 2022 11:42 am
Re: Not letting box2d physics resolve
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.
-
- Prole
- Posts: 7
- Joined: Fri Mar 18, 2022 11:42 am
Re: Not letting box2d physics resolve
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)
fixture:setSensor(true)
Who is online
Users browsing this forum: Google [Bot] and 3 guests