You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the bug is in function Gu::sweepSphereVSTri. It says as below:
//
// Let's do some art!
//
// The triangle gets divided into the following areas (based on the barycentric coordinates (u,v)):
//
// \ A0 /
// \ /
// \ /
// \/ 0
// A02 * A01
// u / / \ \ v
// * / \ *
// / \ .
// 2 / \ 1
// ------*--------------*-------
// / \ .
// A2 / A12 \ A1
//
//
// Based on the area where the computed triangle plane intersection point lies in, a different sweep test will be applied.
//
// A) A01, A02, A12 : Test sphere against the corresponding edge
// B) A0, A1, A2 : Test sphere against the corresponding vertex
//
// Unfortunately, B) does not work for long, thin triangles. Hence there is some extra code which does a conservative check and
// switches to edge tests if necessary.
//
When test sphere against vertex, this function only test with sphere. This may miss contact. In this case, both edge should be tested.
I found a bug in function Gu::sweepSphereVSTri. In some case, it will miss collision.
Below code show the bug. The capsule should hit the triangle at point hitPos. But PxGeometryQuery::sweep do not find the hit.
I found the bug is in function Gu::sweepSphereVSTri. It says as below:
When test sphere against vertex, this function only test with sphere. This may miss contact. In this case, both edge should be tested.
Below patch can fix this problem.
The text was updated successfully, but these errors were encountered: