After setting a btConvexHullShape's collision margin, the AABBs need to be explicitly recalculated.
This has performance implications. When AABBs overlap, More computation is done in terms of building islands, solving constraints, etc. Non overlapping objects at rest can also be deactivated. So this fix helps improve performance when many objects are located close to each other.
For reference, the same calls are done in the bullet examples, e.g. here
The difference in broadphase AABBs is visualized below:
Left: No recalculation (before the changes)
Right: AABB recalculated
The AABB size difference is roughly [0.1 0.1 0.1]
Note that there is still some obvious padding in the updated broadphase AABB
Checklist
[x] Signed all commits for DCO
[ ] Added tests
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.
🦟 Bug fix
Summary
After setting a btConvexHullShape's collision margin, the AABBs need to be explicitly recalculated.
This has performance implications. When AABBs overlap, More computation is done in terms of building islands, solving constraints, etc. Non overlapping objects at rest can also be deactivated. So this fix helps improve performance when many objects are located close to each other.
For reference, the same calls are done in the bullet examples, e.g. here
The difference in broadphase AABBs is visualized below:
Left: No recalculation (before the changes) Right: AABB recalculated
The AABB size difference is roughly
[0.1 0.1 0.1]
Note that there is still some obvious padding in the updated broadphase AABB
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.