blender/intern/rigidbody
valadaptive 2546a058d4 Rigidbody: sync GImpact mesh with collision margin
When setting the collision margin of a mesh-type rigid body object, it's important to also call `updateBound`. There are apparently a bunch of internal Bullet Physics data structures that will return incorrect results otherwise (for instance, broad-phase AABBs will use the old margin). This manifests as extreme instability when using the "Mesh" rigid body shape type, especially at the default collision margin of 0.04--apparently GImpact meshes have a different default margin of 0.01, so our default setting of 0.04 creates an instant mismatch. This was flagged as a TODO apparently since mesh colliders were first added!

This is most obvious when the collision margin is higher than 0.01, since it results in the broad-phase collision detection missing real collisions and causing objects to sink into each other and oscillate. However, there seem to be cases where this improves behavior with a collision margin *lower* than 0.01--not sure by what mechanism.

This should make mesh colliders actually usable now.

Pull Request: https://projects.blender.org/blender/blender/pulls/158322
2026-05-08 12:53:43 +02:00
..
CMakeLists.txt
rb_bullet_api.cpp Rigidbody: sync GImpact mesh with collision margin 2026-05-08 12:53:43 +02:00
rb_convex_hull_api.cpp
RBI_api.h Cleanup: move doc-strings to declarations 2025-04-18 22:58:36 +10:00
RBI_hull_api.h