"skin" radius influence on manifold contact point locations

General Box2D issues or C++ specific issues
Louis Langholtz
Posts: 21
Joined: Tue Dec 20, 2016 10:53 am

"skin" radius influence on manifold contact point locations

Postby Louis Langholtz » Thu Jan 05, 2017 10:11 pm

Hi all, looking for feedback on the following question: what influence (if any) should "skin" radius have on a manifold contact point's location?

To illustrate - in zoomed in detail - here's what I see when the side offsets calculated in b2CollidePolygon.cpp add the total skin radius:

orig-contact-pt.png
Contact point position when adding total radius
orig-contact-pt.png (70.72 KiB) Viewed 250 times

The blue dot is the left side contact point generated for a square sitting on top of another square.

Why is the blue dot so far left of the upper square's left side? That doesn't look to me like the place that the contact point should be.

Here's a second screenshot of my modified testbed and library showing the box "skin" and the contact location calculated without adding any skin radius at all:

mod-contact-pt.png
Contact point position without adding any skin radius
mod-contact-pt.png (89.76 KiB) Viewed 250 times


Looking at the difference, it seems like having the contact point at the total skin radius modified location would lessen the accuracy of simulations.

Ideally, should the contact point really be so far left of the upper square? If not, should it instead be at the left edge of the upper square's skin, or should it align with the upper square's left vertex (as it does in the second image)?

Intuitively at least, it seems to me that the contact location should align with the upper square's left vertex in the given situation.

In playing with the code this way, I also found that simply neglecting the skin radius (while seemingly positioning the contact point more appropriately) causes some touch events to get missed so that's not all that would have to be changed.

Louis Langholtz
Posts: 21
Joined: Tue Dec 20, 2016 10:53 am

Re: "skin" radius influence on manifold contact point locations

Postby Louis Langholtz » Fri May 05, 2017 6:54 am

UPDATE:

I've been continuing to investigate this. Some experimenting I've done since originally posting this and the results I've found I've posted online in case anyone's interested.

Among other things, I've been able to modify the handling such that there's no need for "ghost vertices" anymore and I can even get boxes to slide over floors of boxes without getting caught on edges.


Return to “Bugs, Requests, and Feedback”



Who is online

Users browsing this forum: No registered users and 1 guest