sensor won't detect contacts if rel speed = 0

General Box2D issues or C++ specific issues
Bojopida
Posts: 3
Joined: Sun Jan 11, 2015 12:22 pm

sensor won't detect contacts if rel speed = 0

Postby Bojopida » Sun Jan 11, 2015 12:36 pm

Hi everyone, I'm doing a test with libgdx & box2d.
I noticed that if a fixture is set as sensor, if there's no relative speed (either linear or angular) between the two fixtures, no contact is triggered.
i have a Dynamic body with velocities set to 0 being dragged by the user and another body set as sensor located in the world.
when the two fixtures overlap, nothing happens. if one of them has a angularvelocity, even slow (about 0.4 or more) or a linearvelocity, everything works as intended.
the problem disappears then the sensor flag is set to false.

does anyone have a workaround?
thanks.

Bojopida
Posts: 3
Joined: Sun Jan 11, 2015 12:22 pm

Re: sensor won't detect contacts if rel speed = 0

Postby Bojopida » Mon Jan 12, 2015 6:35 am

I solved in my case using contact filters...

domc
Posts: 6
Joined: Sat May 09, 2015 10:30 am

Re: sensor won't detect contacts if rel speed = 0

Postby domc » Fri Jun 05, 2015 1:34 pm

Please explain your solution. I find that this is Box2D's behavior and I'm about to make make a feature request that the behavior should include situations like this, or fork Box2D and mod it myself. Maybe your solution will save me time!

Bojopida
Posts: 3
Joined: Sun Jan 11, 2015 12:22 pm

Re: sensor won't detect contacts if rel speed = 0

Postby Bojopida » Sat Jun 06, 2015 4:08 am

sorry, I deleted the project and I'm no longer working on development, I don't remember what I did...


Return to “Bugs, Requests, and Feedback”



Who is online

Users browsing this forum: No registered users and 1 guest