Get all actors inside another actor (or box)

Hi,
I need to get all actors inside another actors bounds. I have done this so far:


But I do not always get the actors inside the box. I saw someone mentioning that “Box Overlap Actors” only get the actors that are NOT 100% inside the given bounds/overlap area.

So how can I get all actors that might be 100% inside the area, but also the ones not completely inside?

image

In that case:

image

Does those two get the Actors that overlaps with its collision or with the bounding sphere/box? Because just the collision overlapping is sadly not enough.

How about trying it first? :innocent: And then tell. Generally speaking, actor’s bounds incorporate and account for all component bounds. There are some edge cases scenarios where they do not.

The nodes do precisely what you asked for in the original query. If more nuanced behaviour is needed, provide more juicy details.

Better yet, draw a diagaram with squiggly lines. Attracts the right kind of mathy people.

@pezzott1 watch this space. Might get cool in here. :crossed_fingers:

1 Like

Sadly those did not really work. This is how I used them:

Then I used the Actors to ignore array in a Line trace node, and the line trace did in fact not ignore those actors:

So what I’m doing is multiple Line Traces along a mesh that looks like a pipe (more info about this here: Line Trace 360 around mesh), but the problem is that there might be other Actors that’s too close and will interfere with the Line Trace. I therefore want to ignore those other actors.

My first solution, where I use a Box Overlap Actors and set the extent to be the mesh bounding sphere (the picture in the original post), worked perfectly, to ignore the other actors, up until yesterday… I have already looked over my nodes to see if I have disconnected something or accidentally changed a value or two, but nothing seems to be different.

I have therefore made a temporary solution where I changed the Object Channel and collision preset to a custom ones:


I then made a button in my Utility Widget so I can get all the meshes in my level and set them to the new Collision Preset. I also add the Object Channel to the ObjectType variable

Then right before I do the Line Trace I change the collision preset back to BlockAll for the selected Actor and that seems to do the trick right now. With this solution, I don’t actually need to Ignore any actors.
I’m just so confused why the BoxOverlapActors node doesn’t work this week.

Did you try to confirm the content of the Actors to Ignore array first? If so, how? As in, how can you tell the array is populated with what you think it’s populated with.

I did a test where I placed a mesh (I’m calling it main mesh) which I was going to line trace, then I turned the Bounds and placed a couple of meshes inside the main mesh bounds and some on the actual mesh.
After setting the array Actors to ignore, I used it in a for each loop and printed out the names of the meshes inside the bounds. The names got printed out, but the meshes/actors was not ignored in the trace.

1 Like