21-01-2022, 06:12 PM
(21-01-2022, 04:39 PM)lufydad Wrote: For colliders, there is like dozen of mesh colliders and box colliders, could it be the cause of all this ?
Depends on the mesh colliders, how many triangles each?
(21-01-2022, 04:39 PM)lufydad Wrote: Excuse my ignorance but what are BVHs ?
Bounding Volume Hierarchies. It's the acceleration data structure used to perform collision queries against triangle meshes.
Since testing each particle against each individual triangle in each collider is too much work, a BVH for each mesh is generated. This allows to quickly prune triangles that are not close to a given particle, and allows to test each particle agains just a few (2-3) triangles. Basically, it makes collision detection fast enough to run in realtime.
The thing is that generating the BVH takes some time. In Obi a better alternative to MeshColliders are distance fields, since A) they're built at edit time and stored in disk, so no runtime overhead B) they're faster and more robust than MeshColliders.