Change physics in Unity

I want to make some changes of the physics in my 3D game.
The reason for this is because I have some objects that should not have friction between them.
I know that Physics material exist, but manually attaching it to every object in the game would be difficult.
Setting no friction material as default is also not a good choice, as some objects in the game need friction.
So I came up with the idea of just removing friction calculations between objects with the “Default” and “Player” tags. This would improve performance, and make future development easier and more convenient.

Is there any way I can do this?

You can have a look at “Contact Modification”:

It looks good, but wouldn’t that make the game run slower? As far as I understand, I will have to go through each contact and check the object tags, this looks very slow.

Create a physics material with the ‘Friction Combine’ setting set to ‘Minimum’ and set the friction values to zero. You then only need to apply the material to the moving objects that you don’t want to have friction. The friction settings on all the other static objects won’t have any effect on the moving objects with the zero friction material.

1 Like

Use unity’s collision matrix to disable friction between layers or script dynamic physics material assignment by tags.

Thank you so much Zulo, your answer really helped!