Stephen Gold

Results 469 comments of Stephen Gold

Enabling CCD doesn't solve the issue with ndebruyn's test. The ball still falls through, albeit more slowly. So disabling contact filtering is a much better workaround.

With contact filtering enabled and CCD disabled, the 1st persistent manifold is created without any contact points, which may explain why it's ineffective.

Contact filtering is mainly implemented in `btManifoldResult::addContactPoint()`, which is first invoked during tick 54, 2 ticks after the `btPersistentManifold` was created. [Comments in the Bullet source](https://github.com/stephengold/Libbulletjme/blob/20bafb1ff3f953cc6951ba87b838774c38e8ab2f/src/main/native/bullet3/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h#L54-L55) suggest why the `btPersistentManifold`...

Actually, there are only 4 heightfield squares, thus 8 triangles, none of which failed the bounding-box test. Note `btHeightfieldTerrainShape::getVertex()` factors in `m_localScaling`, so the `btTriangleShape` is defined in the (non-uniformly)...

> get a more complete picture of which triangles invalidate which contact points ```console tick 52 y=1.2449502 vy=-8.501997 manifolds={} tick 53 y=1.1005253 vy=-8.665497 manifolds={7f1359960020} tick 54 y=0.95337534 vy=-8.828997 manifolds={7f1359960020} Contact...

Surprise: 6 contacts, all with Y < 0.03996 To sort this out, I'll need a diagram.

All 6 contacts lie close together near the center of the grid, where 6 triangles meet... The 3 contacts with Z=0 lie on the -X side of the grid, on...

In `getClosestPointsNonVirtual()`, `pointInWorld` is calculated as `pointOnB + positionOffset`. For the first invocation of `addContactPoint()` that is (-0.222395927, -0.438534558, 0.00952136237) + (0, 0.47668767, 0). The Y component is the sum...

Still using "DebugDp" natives ... The [first loop in getClosestPointsNonVirtual](https://github.com/stephengold/Libbulletjme/blob/20bafb1ff3f953cc6951ba87b838774c38e8ab2f/src/main/native/bullet3/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp#L762-L823) exits from line 794 with `iterations == 4`. The [second loop](https://github.com/stephengold/Libbulletjme/blob/20bafb1ff3f953cc6951ba87b838774c38e8ab2f/src/main/native/bullet3/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp#L839-L969) exits from line 911 with `m_cachedSeparatingAxis == (0,0,0).` `m_lastUsedMethod`...

Reading [this article](https://dyn4j.org/2010/05/epa-expanding-polytope-algorithm/) has me wondering whether `calcPenDepth` actually implements the Expanding Polytope Algorithm. The code in btGjkEpaPenetrationDepthSolver.cpp sure looks like it is guessing.