How to change the material only when the bullet hits the object?

I am new to Unreal Engine and I have a question: How to change the color of an object(cylinder) only when it is shot. I tried to do it with EventHit and SetMaterial, but in this case the color changes when I just approach the object, and I don’t need it. So I’m asking for help

When you shoot, you spawn an actor that acts as a projectile, right? You could check what hit the cylinder; in its blueprint:

Cast to the class of the projectile. There is a dozen or so different ways to accomplish that, of course.

1 Like