Static mesh: Change material in blueprint (physical mesh issues)

*I’ve asked this question on AnswerHub too, but I really need a solution for this as fast as possible…
*
Edit: The physical meshes get ‘combined/messed up’ in the editor too, without switching in Blueprint. If I change the material of the static mesh in the editor, it seems like the physical meshes of the 2 materials I’ve created get combined.

I’ve got a static mesh and 2 materials. The static mesh has no material applied to it and both materials have their own physical material.

The problem is that, when applying the materials through code, the physical materials seem to get messed up. For example, material 1 uses it’s own friction and a messed up density value from material 2. Does anyone know what could be causing this problem? Here’s how I’m switching between the materials, I guess I’m doing something wrong here.

Can you do it by editing parameters of one dynamic material instance instead of switching 2 materials? I’m not sure if switching materials like that is recommended, and definitely not how I would do it.

I am new to all of this so I’m not really sure what you mean by editing parameters of a dynamic material instance. Can I find a tutorial somewhere? How do you propose switching materials? I need to be able to change the materials of a static mesh and therefor also the related physical material, which is linked inside the material itself. Thank you

I have tested it in the editor, without switching meshes in Blueprint (deleted this part for the test, so it could not mess up), and it still gives the same issue. When I assign material1 onto the static mesh, it takes the correct material but looks like it combines the physical material in some way. When I change the static mesh into material2 it also messes up the physical material, but it behaves a bit different.