Get Overlapping Actors

Hello,

I would like to know if someone can give me an explanation about the blueprint “Get Overlapping Actors”.

I was thinking it will return only actors overlapping the “source”, but for the moment it return me something with no reason… so i’m a little bit confuse.

Here the use case. I have define a cube and on this cube i have a collision box.

I trigger the function like that:

I trigger the fonction on the “red Cross”. so according to my block, the other block overlapping my selected collision box should be the blue and the green only.

But you can see with a print that i found all block… so i don’t understand why…
The red, yellow, light blue, are not overlapping my selected component so why do i print them as well???

I found 5 items… but i expect to find only 2. Except if i don’t understand properly the function.

That’s why i’m asking that, can you enlight me on the understanding of this fonction?

Thanks in advance.

Hi @BakuryuReitoken

I think maybe this only works at actor level NOT component level so will return ALL overlapping actors regardless of which collision box they overlap.

Only option would be create an exposed array inside your blueprint, then add and remove actors to this array based on which collision overlap they trigger (componentbeginoverlap and endoverlap) and you would need an array for each collision box.

I will keep checking if there is an alternative

It will make sense. i will try to do some test to know if doesn’t work at the component level. but if it was at component level (even if i think you right) why does it return me only 5 blocks? and not the one next column

So i guess i should have 6 blocks if it was at actor level… but i have only 5…
And when i change component input, the result is different as well…

After Test

When i put the next column collision box The result is 1: Like expected.

When i put the top collision box… the result is 0 : Like Expected

But when i put the left collision box… the result is 5: Expected 2

It’s not logic

Also by default UE suggest me to use the function with Component so for me they should work.

I don’t know, why 5???

the 6th actor is the hit actor, it ignores itself

so the other collision boxes are working? remove the one that isnt and replace it and make sure its not going the full width of the actor instead of just the left side. If the others work it suggests the collision box might be too wide and sticking out both sides?

Yes the other collision box are working…

I have reduce the size of the collision box…

And there it find only 1 block : like expected…

Is there something hidden with the size of the collision box component??

show me your character heirarchy top left, also when you make it larger, make sure you move it, its expands from its centre, its possible you are drifting throught the box to otehr side and not realising

For the hierarchy

image

How do i know if i move it properly?? only things i can do is change its location and its scale

Like that it works


Like that it doesn’t work


For me everything seems to be correct regarding the position. Do i miss something?

no it looks ok was just checking it wasnt overlapping the other direction, so at that size what does it now detect?

With that size, it detect 5 actors instead of 2.

With that size

Sometime it detects the good one…
Sometime it detect the main actor…

Like if the collision box is moving…

But at least there is one only… and sometime 0 when i’m on the bottom of the road.

ok lets try something, disable (not delete) that collision, copy the otherside and move it across and rename it approriatley and see what gives

First one diseable

I have 2 block found… expected 1

I have deleted the first one

I have 2 block found… expected 1

i will become crazy

I think i understand…

All block has that overlapping box… that’s mean the size of the actor it’s not the block itself… but the box + the overlapping box… increasing is size… so all block on the top reach now the collision box…

It’s probably that.

all collisions rescale if the actor or root component rescales, so make sure the collisions are set so they miss both its own box and just short of the next box edge, let me know how you get on

Hi there @BakuryuReitoken, hope you’re well!

This topic has been moved from International to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile: