Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody doesn't collide with some triangles in mesh since 5.5
#6
(25-09-2020, 12:27 PM)josemendez Wrote: There was indeed a bug in the BIH structure. Replace Obi/Scripts/Common/DataStructures/BVH/BIH.cs with the one attached, no triangles should be ignored now.

let me know how it goes,

That seems to work, thank you! I will test it some more on other cases but all the ones I've tried so far are fixed now Sonrisa

I had a slight issue with your change indexing out of bounds when all elements are >= to the pivot (--j will iterate below 0) so I added a quick bounds check:

Code:
...
while (bj.center[axis] >= pivot && j > 0);


I'm not sure if this implies a larger issue with the partition not splitting correctly, or just an edge case that needs patching up, but either way it works now. 

Thank you so much for the great support!
Reply


Messages In This Thread
RE: Softbody doesn't collide with some triangles in mesh since 5.5 - by MattS - 25-09-2020, 01:45 PM