# Unexpected behavior attaching to a child actor component

**URL:** <https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279>\
**Category:** Blueprint\
**Tags:** bug, child-actor-componen, unreal-engine, question, Blueprint\
**Created:** [November 3, 2015, 2:27am UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279 "2015-11-03T02:27:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_5679c567](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5679c567](https://forums.unrealengine.com/u/anonymous_user_5679c567)\
**Post date:** [November 3, 2015, 2:27am UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/1 "2015-11-03T02:27:56Z")

</div>

Hey Epic!  
I’m using a child actor component to nest blueprints inside of other blueprints, but am getting unexpected results for attaches. In this image - Cube1 is a “Child Actor Component” that spawns a blueprint which applies transforms to itself. Sphere is just a regular static mesh. When I attach the Sphere to Cube1 it seems to attach to the “Child Actor Component” rather than the actor that the child actor component spawns. This means that none of the transforms the blueprint applies to itself get inherited by Sphere.

 ![65319-attachtofail.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/e/c2e7daae96169945c2d852a1afac56543478ace6.jpeg)

To get the kind of behavior I expect, I have to grab the child of the “Child Actor Component” and attach to that, as exemplified in the following image:

 ![65320-attachtosuccess.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/d/47dd8da33be690f5e3a8f92877585ef8e56f078c.jpeg)

With this setup, any transforms applied to the spawned blueprint also get applied to the Sphere. I’m wondering if this is a bug or if I’m just making a sug.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 3, 2015, 3:34pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/2 "2015-11-03T15:34:13Z")

</div>

Try changing the Attach type to snap the sphere to the cube. Additionally, if you created a socket on the cube to attach to, ensure that “In Socket Name” is filled out to reflect the socket you are attempting to attach to.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5679c567](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5679c567](https://forums.unrealengine.com/u/anonymous_user_5679c567)\
**Post date:** [November 3, 2015, 7:25pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/3 "2015-11-03T19:25:51Z")

</div>

Attach type doesn’t matter. Also worth noting that having Sphere be a child of Cube1 in the hierarchy has the same issue: Sphere doesn’t inherit any transforms applied to the actor spawned by Cube1. Example below:

![65396-alsobroken.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/9/6d940759c9a9dc03085bb7ad9b57ec11d36f5761.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 3, 2015, 7:35pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/4 "2015-11-03T19:35:09Z")

</div>

Is this similar to what you are seeing:

> **[ChildActor SetChildActorClass not attaching to parent](https://forums.unrealengine.com/questions/317829/childactor-setchildactorclass-not-attaching-to-par.html)**
>
> I noticed a bug related to the UChildActorComponent The problem occurs when i call the SetChildActorClass at runtime, And it’s not attaching the new Actor to the ChildActorComponent and it causes the child actor to not to inherit the parent actor’s...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5679c567](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5679c567](https://forums.unrealengine.com/u/anonymous_user_5679c567)\
**Post date:** [November 3, 2015, 9:25pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/5 "2015-11-03T21:25:29Z")

</div>

Similar but not the same. To use my example: He is applying a transform to Cube1 and the “blueprint that it spawns” is not inheriting that transform.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 4, 2015, 3:55pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/6 "2015-11-04T15:55:23Z")

</div>

Do you have a sample asset I can take a look at? This seems like it may still be the same error the link above shows but if I can get a copy of the asset in question I can clarify further.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 9, 2015, 2:33pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/7 "2015-11-09T14:33:11Z")

</div>

Hi chorne,

We have not heard from you in several days. I am marking this thread as answered for tracking purposes. If you are still experiencing this error, please comment with the requested information.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5679c567](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5679c567](https://forums.unrealengine.com/u/anonymous_user_5679c567)\
**Post date:** [November 10, 2015, 12:32am UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/8 "2015-11-10T00:32:12Z")

</div>

[link text][1]  
I’ve attached a file with two assets. If you open up BREAKAGE asset you’ll see it has a childActor component that spawns a “moveitself” asset (which…moves itself) with a sphere as the child of the childActor. If you drop the breakage asset in the scene and hit play you’ll see the cube run off into the distance with the sphere left behind. I wouldn’t expect this to happen.

[1]: [.) (143 KB)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 10, 2015, 9:00pm UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/9 "2015-11-10T21:00:06Z")

</div>

I was able to reproduce this on my end and have entered a bug report, UE-23184, to be assessed by the development staff.

---

<div class="post-metadata">

**Author:** ![Dig\_Squid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dig_squid/32/1145423_2.png) [@Dig\_Squid](https://forums.unrealengine.com/u/Dig_Squid)\
**Post date:** [November 11, 2015, 8:50am UTC](https://forums.unrealengine.com/t/unexpected-behavior-attaching-to-a-child-actor-component/337279/10 "2015-11-11T08:50:12Z")

</div>

I think this is by design. A ChildActorComponent spawns an Actor and attaches the RootComponent of that Actor to itself. It does not make the ChildActorComponent the root of the spawned Actor, that could break the functionality of the spawned Actor, it may expect a particular root.
