Quickest, and probably simplest question ever:
Is there any benefit in creating collision rules for various static meshes that you've positioned overlapping each other? E.g a tall box representing a building that intersects the ground.
Or does their nature mean that bepu knows they won't interact with each other?
Thanks
Static meshes optimised?
Re: Static meshes optimised?
Static/kinematic objects are not tested against each other by default. The mechanism behind it is actually collision rules; static and kinematic objects belong to a different CollisionGroup by default that only collides with dynamic objects (CollisionRules.DefaultKinematicCollisionGroup versus CollisionRules.DefaultDynamicCollisionGroup).
That said, there still remains a tiny cost of actually evaluating those collision rules and realizing the pair can be skipped. It's extremely trivial compared to a full pair test, but you still may find in large simulations that avoiding it is useful. A StaticGroup containing the relevant static objects is a good option in such a case.
That said, there still remains a tiny cost of actually evaluating those collision rules and realizing the pair can be skipped. It's extremely trivial compared to a full pair test, but you still may find in large simulations that avoiding it is useful. A StaticGroup containing the relevant static objects is a good option in such a case.
Re: Static meshes optimised?
Ahh, excellent. Haven't encountered the StaticGroup yet. From a look at the error messages, you have to give it a list of collidables for its constructor?
Can you not assign groups like you did with the collision group? What if you wanted to add more to it at runtime?
Can you not assign groups like you did with the collision group? What if you wanted to add more to it at runtime?
Re: Static meshes optimised?
StaticGroups are the static equivalent of compound collidables. Since a hierarchy is created for the set of contained objects, any additions or removals require a hierarchy update. Currently, the StaticGroup (and CompoundShape) do not support mutability. That's on the roadmap, though.