Is "generate overlap events" expensive?

Hello! For my top-down game I am trying to create a system so that when the character goes inside a room, whatever is between the pawn and the camera becomes opaque. The way I am having this happen is by creating a component that contains the function to make it opaque, and having a collision volume between the player and the camera. So when the player overlaps the scene component, it’ll make it invisible.

This means that in order for it to work, I have to enable “generate overlap events” on every actor that I want to become invisible, which leads to my question: Is “generate overlap events” expensive to have ticked on many actors? Or is it not that big of a deal?

Thank you!

Hi there, i guess this is pretty relative compared to your alternatives.

I would suggest to take an actor, configure it and duplicate a decent amount of them in your level. (just a few alt+drag when selecting a whole duplicated bunch over again). If your profiler doesn’t burn, i guess you should be good :slight_smile:

This is what i did with the Menger-Sponge fractal: Over 6000 actors, all of them with overlap events, and ingame there are about 20 pawns speeding around on the surface where every pawn overlaps with about 4 of them. No issue at all.

hth :slight_smile: Marooney

1 Like

Btw. the limit was just duplication freezing and crashes in editor.

Thank you! This answers my question pretty well.

Very nice. Good work dude. This data helps me as well!

I’d like a second opinion about these overlap functions, please.

Any (other) experienced coders out there?

Are they tick functions?

I avoid tick functions or I create my own delay loops under very specific conditions to ensure the highest performance possible.

hello there
Did you ever get more knowledge about this topic?

Hello, Slender,

So, 1.5 years later, I’ve picked up on a few things:

Overlap functions are native Engine functions; they are handed by C++, directly, and not calculated with a virtual machine. As such, they are VERY fast and pretty cheap. The only time you run into trouble is if you have many actors calling many overlaps over and over in quick succession.

Yes, they are tick functions, but they are native, inexpensive tick functions. You can put dozens of them before you find any real consequence.

2 Likes