So I have an actor I spawn from a blueprint class on a key press and depending on which of two keys is pressed will determine it’s (int)team. I would like to tint the colour of the actor depending on its team. E.g. Team 0 actors are slightly blue while team 1 are slightly red.
I’m attempting this is blueprints and thought this would just be like multiplying a textures RGB values but I couldn’t manage to access the material/texture in blue prints.
For reference the mesh is specifically the ‘sk_CharM_Base’ from the Infinity Blade: Warriors content pack by Epic Games that I’m trying to colour.
Thanks in advance
Expose the Team int on Spawn (of the Actor you want to Tint) so you can easily set it in the Spawn Node (See picture)
On Beginn play Create a Dynamic Material Instance. Input the Mesh you want to tint and the index of the Material. Use the Material you already got on your Mesh. Switch on int Add 2 more pins (or even more if you got more teams) than you Set a Vector Parameter (RGBA Color) on the Material. Set the Parameter Name correctly like you have it in your Material.
In your Material Create a Vector Parameter and name it Correctly. Thats the Value that comes from your BP do with it whatever you like I simply put it into Color you can Multiply it or whatever up to you =)