I could debug that in AbstractMesh._collideForSubMesh, one submesh had 5 vertices. Therefore eventually in Collider._testTriangle, one point is missing for a triangle. It is no direct relation but I checked the file in Babylon Sandbox and it’s a valid glTF.
I academically agree but practically disagree
The code for collisions is quite complex and I try to keep it as simple as possible. If we need to test for mesh validity per frame per triangle, the cost will be prohibitive
yes but even that could happen on a complex object in the middle of a frame. If i was able to run that off thread, I would sign right now but JS is still living like a caveman with no real thread support
@Tricotou’s answer works for me. I’m already doing some kind of validation on setting collisions, so I’ll just modify my logic as something like mesh.checkCollisions = flag && !!mesh.getTotalIndices();. I think the slight performance change will be worth the trade-off
Thanks a lot! Always a pleasure having you guys looking after me
Ahah joking of course . Makes me think about this awesome prez about JS main event loop. 6 years later, I’m still waiting for a JS version with real multithreading/multiprocessing