Projectiles colliding with static meshes etc

In my game the player fires projectiles that should impact with walls and enemies etc. For now I have used the event ActorBeginOverlap to do this and it works fine, except for one detail, that I have to set Generate Overlap Events to true on all the walls and objects in all of my levels.
Is there a smarter way to check for collision or a way to make all those meshes automatically generate overlap events or something where I don’t have to check a bool on all objects in every level.

Are you sure you have to set the flag on both actors? I’m pretty new to UE4 myself, but I think it should be enough to set the flag on the actor you want to trigger the event, as long as the collision channel settings of both actors allow an overlap/collision to be created. Is it possible that you don’t have the walls/enemies/… set to respond with overlap to whatever channel you are using for the projectile? You might want to use an extra channel for your projectile anyway and you can set the default response to overlap. Then you don’t have to manually set any flags at all.

I have tested and it says when you hover over the blueprint node.

“Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.”

Hmm. I only work with code and I just tested a little with my own projectiles, which are currently using collisions instead of overlaps (probably gonna change that soon). I disabled the generate-hit-events flag on a character mesh and the projectile still triggered the event when hitting that character. But I never did this with blueprints, so no idea… Or maybe overlaps and collisions work differently in that respect.

Anyway, I would still check the collision channel settings to see if an overlap is even possible.

I just made a simple blueprint-only setup with an overlapping projectile using the OverlapAllDynamic profile. Hit events fire without having set the overlap event flag on other actors. Have you tried using both the actor-event and the component-event for BeginOverlap?

edit: Ok this is weird… at first it was working, then I played around with it a little and now it’s not :confused:
It’s not the prettiest solution, but if you just don’t want to set the flag manually, you can either derive a new actor class or mesh component that simply sets the flag on construction. Or you iterate through your actors procedurally and set the flag that way.

Depending on how your projectiles move, you could also sweep them “manually” every frame. That way you always get hit/overlap info.

Since I want to use overlapping projectiles too, I will keep experimenting and let you know if I found a better solution.