- Home /
Issues Building with Mesh Colliders
Hello,
I'm currently working on a VR project that involves grabbing small anatomical structures and examining them. For this reason, I'd like to use mesh colliders on the objects to make grabbing them as accurate as possible. Due to the plugin I am using for VR grabbing, the objects have rigidbodies and must be convex.
Understandably, most of the models are way too detailed to use Unity's generated convex mesh. I usually have to use the InflateMesh property in order for the mesh to be generated without errors. This works in-editor, but there's a rather large hiccup (game freezes for several seconds) when loading in these convex meshes (profiler says this is due to "GameObject.Activate -> Mesh.Bake Scaled Mesh PhysX CollisionData").
I thought that the "Prebake Collision Meshes" setting in Player Settings would solve this issue, baking the convex meshes with their inflated values and removing the hiccup at runtime. This wasn't the case, as whenever I attempt to build the project it spits a bunch of errors about not being able to make the convex mesh. I tried increasing the InflateMesh number all the way to 1 (the colliders were basically boxes) yet I still get errors when building.
Does the "Prebake Collision Meshes" setting ignore my InflateMesh settings? If so, how can I go about loading in these convex meshes without my game freezing for several seconds?
Thanks
Your answer
Follow this Question
Related Questions
How can I do drilling using mesh colliders 0 Answers
Anyway to make my object not fall through the floor without convex? 0 Answers
MeshCollider (concave) doesn't trigger OnCollision functions 0 Answers
Is there any way to get the optimized (cooked) mesh of a mesh collider? 0 Answers
Rigidbody falls through plane 2 Answers