I’m responding even later but I think that while this is very close to being right, it is wrong in the sense that the behavior is placed in the wrong hands. In the above, the projectile OnHit event is given the side effect of spawning the bullet hole decal (and destroying itself). This is wrong for several reasons:
- Only the actor taking the hit knows what kind of decal to spawn. Different actors/materials would look differently when struck.
- Its likely that you would want the spawned decal to stick (weld?) to the actor that received the hit so if there was subsequent movement it would keep its relative position. Think of a moving target or human falling to ground.
i.e. I think the behavior should be on the OnHit event of the other actor in the collision.