Is it possible to apply different physics materials to various submeshes?
In the Unity editor I can easily apply various materials to each submesh of my 3D model, however, the physics materials are applied to my mesh collider and the collider doesn't divide itself the same way. Is there a way to divide the submeshes of a 3D model inside the editor (or via script) to separate colliders so that I can have various physics materials with the same object?
Answer by Edy · Jun 15, 2020 at 01:13 PM
Unfortunately that's not possible. Each Collider can have only one PhysicMaterial, so multiple physic materials require multiple meshes. Possible options:
Subdivide your mesh
Create a subdivided copy of your mesh, then use it as colliders only.
Make a script that extract the submeshes out of the visual mesh, then creates the corresponding colliders per each submesh. The Unity API exposes all you need (MeshCollider, MeshFilter, Mesh).