# Get all actors inside another actor (or box)

**URL:** <https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [February 12, 2024, 2:17pm UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796 "2024-02-12T14:17:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![XxpiingyxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxpiingyxX](https://forums.unrealengine.com/u/XxpiingyxX)\
**Post date:** [February 12, 2024, 2:17pm UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/1 "2024-02-12T14:17:55Z")

</div>

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/6/ac657143337bb4ce5925c7fa72f75501db8a5fad.jpeg)  
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?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 12, 2024, 3:50pm UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/2 "2024-02-12T15:50:43Z")

</div>

> [@XxpiingyxX](#):
>
> So how can I get all actors that might be 100% inside the area, but also the ones not completely inside?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/c/a3c063e669f094c02e4732a80895be12b5ac4f2c.png)

> [@XxpiingyxX](#):
>
> I need to get all actors inside another actors bounds.

In that case:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/1/631e9983b4450e7deb3d6a75a2f1feffc6f2047d.png)

---

<div class="post-metadata">

**Author:** ![XxpiingyxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxpiingyxX](https://forums.unrealengine.com/u/XxpiingyxX)\
**Post date:** [February 13, 2024, 7:19am UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/3 "2024-02-13T07:19:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 13, 2024, 8:15am UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/4 "2024-02-13T08:15:41Z")

</div>

How about trying it first? 😇 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.

> [@XxpiingyxX](#):
>
> get all actors that might be 100% inside the area, but also the ones not completely inside?

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. 🤞

---

<div class="post-metadata">

**Author:** ![XxpiingyxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxpiingyxX](https://forums.unrealengine.com/u/XxpiingyxX)\
**Post date:** [February 13, 2024, 9:27am UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/5 "2024-02-13T09:27:19Z")

</div>

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/0/c700b91e23f4e44f160c0f80be6fd7121d2ec1ab.jpeg)

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/5/c/85c199eab7a6e42ac850e3ddb78a873b8ac75950.jpeg)

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](https://forums.unrealengine.com/t/line-trace-360-around-mesh/1626160)), 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:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/2/7027fa05694e699029016b1f8a548d1aef4cfa6b.png)  
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  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/9/0b994576aff81be777e02e0b80a6605b5b68bb20.png)  
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.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 14, 2024, 9:56am UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/6 "2024-02-14T09:56:12Z")

</div>

> [@XxpiingyxX](#):
>
> Then I used the _Actors to ignore_ array in a Line trace node, and the line trace did in fact not ignore those actors

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.

---

<div class="post-metadata">

**Author:** ![XxpiingyxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxpiingyxX](https://forums.unrealengine.com/u/XxpiingyxX)\
**Post date:** [February 14, 2024, 12:07pm UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/7 "2024-02-14T12:07:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 30, 2025, 12:17pm UTC](https://forums.unrealengine.com/t/get-all-actors-inside-another-actor-or-box/1683796/9 "2025-01-30T12:17:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
