As the title says. I was getting mysterious crashes when using a ray with mesh collider and couldn’t find the cause, but after testing everything I noticed that the only thing that was different was that I had changed from box collider to mesh collider…
I also searched about this and found other people complaining about mesh collider related crashes.
Have others filed a bug report? If not, if it’s reprodable, make one
I don’t know, and it’s kind of random, and it depends on the object as well. But it definitely happens because of mesh colliders. My guess is the ray detects too many hit points or something like that, there’s some kind of buffer overflow and everything crashes.
Not a rigidbody. Kind of afraid to update, I remember I tried before in some other project and got a shit ton of errors and couldn’t fix them, even tried to downgrade back and it wouldn’t work. It installs 2.5.2 by default, though looking at the package manager it says 2.5.4 is the recommended one (so why it installs 2.5.2?). Anyways…if I find some time I will try to replicate the problem with a free model on 2.5.4, then try on 3.0 to see if the problem is still there.
It probably has to do with the model’s complexity as well. It has 793329 vertices and 505154 triangles, 60MB.
If you use the prefabs we provide, upgrading to 3.0 can be fairly painless.
if you run into issues in between, I recommend deleting your package cache in your library folder and then reimporting everything.
All that said, your model sounds way too complex for a mesh collider and I would advise you to avoid adding physics to such complex geometry. Even in 3.0 I don’t think your app will be stable interacting with it.
The ideal is only use primitive colliders.
A tool like this one can help reduce the complexity of your colliders.
All that said, your model sounds way too complex for a mesh collider and I would advise you to avoid adding physics to such complex geometry. Even in 3.0 I don’t think your app will be stable interacting with it.
Thanks, so there is an issue. Can I ask to add an information note to the mesh collider component that models that are too complex may cause the app to crash? It’s not obvious the source the issue since it just crashes the app. Something like this I mean