Same Mesh, different physics material per face

Hi,

I have a question about physics materials. How can I script (C#) it so that each face has a different physics material value.

For example a Cube.

Top face = no friction on the physics material.
Bottom face = Low friction on the physics material.
Sides x 4 face = Medium friction on the physics material.

Thanks!
Sharing is caring!

https://twitter.com/IndieNendoroid

The only way I can think of to get one cube mesh to have multiple materials would be do have 4 separate collider components, each set up to cover one face of the cube, that way each collider could be set to a different physics material. So one cube mesh, then slim box colliders configured to cover one face each.

Might be another way but I’m fairly sure this would be a relatively simple way to achieve this.