Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Adding ObiColider To Generated Mesh Is Slow
#5
(08-08-2025, 12:58 PM)josemendez Wrote: Hi!

Creating a MeshCollider involves building the spatial acceleration structure for it (bounding interval hierarchy, in Obi's case) which takes some time. This is currently done in the main thread.

The hierarchy is created in ObiTriangleMeshContainer.cs (by calling the BIH.Build() method) every time a new MeshCollider gets a ObiCollider component added to it. You could try modifying this file to use a job or a coroutine, in that case special care should be taken to make sure particles can't actually approach the collider before its creation is finished - otherwise they'll ignore it.

kind regards,

Thanks. I thought this would be the way to go but was just checking if you had something else I am missing.
Reply


Messages In This Thread
RE: Adding ObiColider To Generated Mesh Is Slow - by aderae - 08-08-2025, 01:17 PM