How to give my Ai unique dynamic materials?

GeneralGir
Sun, 26 Jan 2020 09:50:29 +0000
Rendering

Good sunday fellow devs,

I have a playable ship, ship has a thruster that changes emissive brightness when I pull the gamepad trigger. I set this up using a material > material Instance > material parameter collection.

The problem I am having is that the Ai (multiple ships up to 40) are duplications of my ship and share the same thruster material. This means that I pull the trigger and light up my thruster, so does in unison the fleet of Ai.

How do I allow each Ai to have its own material instance collection logic? Rather than create 40 unique material sets in the content browser and assigning directly, is it possible to generate a unique thruster material on begin play/construction script?

Many Thanks

4 posts - 1 participant