mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
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 |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| rb_bullet_api.cpp | ||
| rb_convex_hull_api.cpp | ||
| RBI_api.h | ||
| RBI_hull_api.h | ||