Change material to be the same as collided object material

Wouldn’t something that simple work for you:

This could be placed in the wall actor/component.

I am trying to construct a blueprint that changes the material variable of an object to the same material as the object that has been collided with.

(For example; if a blue ball hits a red wall, the wall will then be blue.)

The desired functionality is as follows;

  1. Projectile hits the wall, the walls material changes to the material of the projectile.
  2. The second projectile hits the wall, wall changes material to that projectiles material.
  3. Repeat with any number of projectiles and materials.

For the desired functionality, the wall needs to be able to know what material it needs to change to as the projectile collides with it, not before. The wall needs to actively seek out the material it needs to change to without having a direct reference to that material from the get-go.

I’ve been messing around for a while trying to get this to work an came up with a way to change the walls material, but the material that it is changed to is the generic checker default, not the material of the projectile.

As I’m relatively new to the Unreal Engine and Blueprint I’m probably missing something fairly basic, I’ve look through the documentation in the areas I believe to fit my issue and am at a loss. So any help would be appreciated.

Okay, so I did try that. It didn’t work because, for some reason, I had put a random collider around my projectile blocking the material on it from ever making contact. In short yes this worked, thank you for clearing that up.

I now know why I put it there. Still learning, expect more of these embarrassing questions. Thanks again.