# GetActorBounds ignores child actor components & instanced meshes

**URL:** <https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305>\
**Category:** Asset Creation\
**Tags:** actor, child-actor-componen, bounding-box, unreal-engine, Instanced-Mesh, bounds, question\
**Created:** [January 16, 2016, 10:56pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305 "2016-01-16T22:56:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [January 16, 2016, 10:56pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/1 "2016-01-16T22:56:53Z")

</div>

I hope these images speak for themselves: (bounding box is visualised by box trace)

Ignored 5 instanced static meshes when calculating actor bounds:  
74744-  
Child actor components are also ignored:  
74745-  
It looks like child actor components and instanced meshes are not considered as a part of an actor somewhere in the process, because there is a bug with “Merge Actors” tool that **also ignores** child actor components and instanced meshes: [https://answers.unrealengine.com/questions/357688/merge-actors-2-bugs.html](https://answers.unrealengine.com/questions/357688/merge-actors-2-bugs.html)  
… So that might be a clue for this bug.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [January 18, 2016, 6:19pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/2 "2016-01-18T18:19:14Z")

</div>

Hello ,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

1. Could you elaborate on this issue and explain how the result you are receiving is at an inverse to the result that you would expect?
2. Can you reproduce this issue in a clean project?
3. Could you provide screen shots on any blueprints/code that may be involved?

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [January 18, 2016, 6:39pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/3 "2016-01-18T18:39:12Z")

</div>

Yes, it can be reproduced in new, clean project by adding Child Actor Component into a blueprint (for example by using “Add Child Actor Component” in Construction Script) and checking actor bounds by GetActorBounds node. Bounds can be visualised by e.g. performing a Box Trace with Start & End set to ‘Origin’ output and Half Size set to GetActorBounds’ “Box Extent”.

![74971-notitle2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/6/2969d569e1814fbcd4a97b631b464fb727f83779.jpeg)

Any added Child Actor Component will be not taken into account when calculating actor bounds. Same for instanced static meshes.

 ![74959-notitle.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/5/d758a65b5ce94e2971336d2a97c4d9c9913e00ef.jpeg)

The apple on the image is a Child Actor Component, while threee other objects are Static Mesh Components. It doesn’t take the apple into account when calculating actor bounds. On the left is what bounding box looks like, on the right - what it should look like (so it treats the apple as a part of the actor, just like these three other meshes)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [January 20, 2016, 6:12pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/4 "2016-01-20T18:12:05Z")

</div>

I was able to reproduce this issue on our end. I have written up a report (UE-25749) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Note: You could get the bounds for the child actor. I have added an example below.

![75279-childactorboundshelp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/9/159284539aba41b839abd826508f983baa005388.png)

Make it a great day

---

<div class="post-metadata">

**Author:** ![Kenomica](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kenomica](https://forums.unrealengine.com/u/Kenomica)\
**Post date:** [February 12, 2016, 7:24am UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/5 "2016-02-12T07:24:34Z")

</div>

I have a very similar issue, which I posted back in June 2015 and have still had no official response.

I assume this is the same bug?

> **[\[BUG REPORT\] Destructible Mesh spawned as child actor has no bounds](https://forums.unrealengine.com/questions/248768/blueprint-child-actor-flickering-flashing.html)**
>
> \##Branch: Binary ##Build version: From 4.8 to 4.12 ##Detailed description of the issue: Destructible meshes that spawn as child actor components have no bounds. They flash and flicker based on the camera position - also occluding everything...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [February 15, 2016, 7:33pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/6 "2016-02-15T19:33:06Z")

</div>

Hello Kenomica,

I took a quick look at the issue that you linked in your last comment. It appears as though these could be related. I will be sure to bump up the community interest for this issue.

---

<div class="post-metadata">

**Author:** ![Kenomica](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kenomica](https://forums.unrealengine.com/u/Kenomica)\
**Post date:** [February 25, 2016, 9:12pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/7 "2016-02-25T21:12:40Z")

</div>

Thanks for the response. I really hope so, since this issue has been delaying the release of my game for a long time now.

I’m glad it’s been seen!

---

<div class="post-metadata">

**Author:** ![Kenomica](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kenomica](https://forums.unrealengine.com/u/Kenomica)\
**Post date:** [May 8, 2016, 3:17pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/8 "2016-05-08T15:17:07Z")

</div>

Any further news with this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [May 9, 2016, 1:51pm UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/9 "2016-05-09T13:51:42Z")

</div>

Hello Kenomica,

After taking another look at the report, it appears that the status has been updated. This functionality is working as intended.

---

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [September 16, 2016, 9:25am UTC](https://forums.unrealengine.com/t/getactorbounds-ignores-child-actor-components-instanced-meshes/344305/10 "2016-09-16T09:25:31Z")

</div>

In case anyone still wants this:

```
void AYourAmazingActor::GetBoundsIncludingChildActors(bool bOnlyCollidingComponents, FVector& Origin, FVector& BoxExtent) const
{
	FBox Bounds = GetComponentsBoundingBox(!bOnlyCollidingComponents);
	TArray<UActorComponent*> ChildActorComponents = GetComponentsByClass(UChildActorComponent::StaticClass());
	for (UActorComponent* ChildActorComponent : ChildActorComponents)
	{
		const AActor* ChildActor = Cast<UChildActorComponent>(ChildActorComponent)->GetChildActor();
		if (IsValid(ChildActor))
		{
			Bounds += ChildActor->GetComponentsBoundingBox(!bOnlyCollidingComponents);
		}
	}
	Bounds.GetCenterAndExtents(Origin, BoxExtent);
}
```
