Skip to content

Fix sleeping rigid-body activation from broadphase-only overlaps - #4818

Open
kVinsom wants to merge 1 commit into
bulletphysics:masterfrom
kVinsom:fix/4815-contact-island-activation
Open

kVinsom wants to merge 1 commit into
bulletphysics:masterfrom
kVinsom:fix/4815-contact-island-activation

Conversation

@kVinsom

@kVinsom kVinsom commented Oct 21, 2026

Copy link
Copy Markdown

Fixes #4815.

A sleeping rigid body currently joins an awake body's simulation island when only their padded broadphase AABBs overlap. This can wake and move the sleeping body even though the two bodies never touch.

Merge rigid-body pairs using nonempty narrowphase contact manifolds. Keep broadphase unions for other collision-object types, including soft bodies whose contacts are handled outside these manifolds. Also ignore empty manifolds during kinematic activation in both island managers, including the unsplit solver path. Constraint and predictive-contact unions remain in place.

Add a CTest regression target covering broadphase-only overlap, real dynamic and kinematic contacts, contacts without response, constraints, CCD predictive contacts, and a sphere passing a sleeping box on a plane. The cases cover deterministic ordering and split/unsplit islands; MT configurations are enabled when Bullet is built with thread support. Comments and the new source header follow the project's contribution guide.

Validation

Tested on Linux under WSL with GCC 15.2:

  • Full default CMake Release build and CTest: 8/8 targets passed. Optional OpenGL support was unavailable locally.
  • Default configuration: 32 regression cases passed.
  • Debug, double precision, BULLET2_MULTITHREADING=ON, OpenMP: 64 regression cases passed.
  • Debug with AddressSanitizer, UndefinedBehaviorSanitizer, and leak detection: 32 regression cases passed.
  • The same default regression cases linked against the original island-manager implementations produce 10 failures, including the passing-sphere scene; the fixed implementation passes all 32.
  • C++98 syntax checks and git diff --check passed. The new test passes clang-format using the repository settings with the pre-existing duplicate AccessModifierOffset entry removed in a temporary copy.

Development and regression testing were assisted by OpenAI Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sleeping body is woken and moved by a body that never comes within contact range

1 participant