Set decal material via line trace?

Hi all,

I have a scene with a few different decals and want to change their materials if a player is looking at them. Each decal has two material instances to swap between depending on if they are being looked at or not. I’m fairly new to blueprints so I’m having a hard time figuring out how to go about this at a high level.

Currently in my scene I’m swapping the decal materials via trigger volumes in the level blueprint just to test each material instance, which is working fine. To test line tracing I added a trace from the camera in my character blueprint. Right now all it does is spawn a new decal at a specific location if it hits a dynamic object, again working fine but not super useful.

I’m hoping someone can point me in the right direction of where to go from here. Ultimately it needs to send out a line trace from the camera, detect if it’s hitting a decal (or area in front of the decal), determine which decal it is (total of 4), then set the appropriate material. Ideally if the player looks away it would then reset to the original material, but that’s less important than figuring out the first part. Thanks in advance!

Worked this out if anyone has a similar question in the future. I used “bind to event” to pass a variable from my player controller blueprint to the level blueprint.