How do I switch materials on a mesh?

I’m using my own class called powers and trying to have that switch materials on my player character’s class. I’ve tried using the “get instigator” node in my powers class and hooking that up to a “cast to player’s class” node. However, that doesn’t seem to work for Set materials node. Am I using the set materials node all wrong? What is the best way of doing this?

If I understand you correctly, you are trying to change material on your class?

Could you show us the BP you have? Are you using a “dynamic material instance”-node?
If you just want to change properties of your material during runtime you can use Material Instance Dynamic. You create them in the blueprint, assign them to your mesh, then you can change any parameters of your material during runtime.

I would recommend this link:

–Maffa

1 Like