Why an actor can overlap itself?

Dear experts,

I was spawning a type of actor at runtime using SpawnActor(). The actor has two component: box as root, and static mesh. Both components have the same attributes: not simulate physics, collision query only, overlap with all channels.

I found that each time one actor was spawned at runtime, two begin-overlap events were fired, in which the ``AActor* OtherActor’’ is the actor itself. I’m wondering what leads to these two events, and if this behavior is expected. Thanks for any hint.

That happens because you have two elements inside the actor that checks for overlaps. Since these overlap they both fire and since they are from the same actor they become themselves. You can ask it to ignore actors of a certain class OR you can change the channels it works on. I would recommend removing one though, as in most cases you dont need two.

Many thanks for your quick reply. That makes a lot of sense now.