Change dynamic material parameter issue

Hi there,

here is my setup : I’ve got a seat which I want to change the material color using line trace.
My pawn traces line from hand, detecting each part of the seat (i had to separate it into several meshes so that I can get the item index of each).

Here is the blueprint of the seat :

So all the parts (static mesh components) are set into an array [Comps] in construction script.
On Beginplay, each component is checked, its material is instancied, all these instances are set into an array [Mats Dyn] and applied to each component again.
When the pawn linetrace hits a component, I have to cast to the static mesh to get its name, check its index in [Comps] array, get this index to find the corresponding dynamic material in [Mats Dyn] array, then change the “None” (defaut color parameter) of the dynamic material into black.

It works well only for the first item in the array [Mats Dyn] (index 0) when hitting the associated component.
None of the other works.
Any idea why ?

Thanks a lot, I hope I was clear enough…

Looks like the dynamic material instances are not correctly applied to each part. Does someone know how to do that ?

Aaaand okay, 2 minutes after I found that each component only has ONE item, so the “set material” node has to be used with “element index” set to 0.
My bad !