How to check if 2 actors overlap each other?

Hi, I’m spawning an actor inside another actor. I’m trying to access one actor from the other actor’s blueprint, through the Overlap event. But for some reason the Overlap Event doesn’t trigger. I tried all collision options.
Please help! Thanks.

So if you are spawning already overlapping actors there is no event unless collisions are refreshed.

So you have 2 options

1-Get Overrlapping actors
2-Set Collision with Update Overlaps.

You can just try getoverlappingactors node and print them on tick to see if your collisions are working right.

1 Like

What do you mean?

Yeah, it works. But I need to get the actor only once. I tried on BeginPlay, but doesn’t work.

On begin play of spawned actor

that would cause OnBeginOverlap event to trrigger if the collisions are set right. You can set them overlapall just to test.

Let me know if it works.

1 Like

Yes, it works with that node. Thanks a lot. I have the collision set to BlockAll.
I also got it to work with adding a collision component to one of the actors. Now, I don’t know which way is more efficient.

My pleasure. glad it worked. However you like. there is not too much of a difference in terms of performance but spawning things always costly if we consider tiny bits. So better have a collision already existing on actor that is done on constructor rather than adding it so you can avoid and additional spawn operation.

But as I said it doesn’t matters that much if its solving the problem. Mark it as solved ^^

1 Like