Child component moved away

Hi!
I watched “Blueprint QuickShot - 6 - making Procedural Content” and created the same ManyBoxes blueprint. Then I decided to give some physics to boxes and created a blueprint called PhysicsBox, that contains a static mesh component with enabled gravity. In ManyBoxes, I changed Add StaticMeshComponent to Add Child Blueprint, and set PhysicsBox in its parameters. But when I tried to simulate this, all boxes moved to the other point, but the root component of ManyBoxes didn’t moved. But if to use just PhysicsBox, then it works perfectly.
Start:


Simulate:
ManyBoxes:

I spend several hours trying to understand the problem, but I didn’t found it… Can somebody help?

With best regards,
UCoder123.

P. S. If needed, I can send assets via E-Mail - I can’t attach *.uasset files to thread…
P. S. 2 Does the EULA allows me to send them via E-Mail? :slight_smile:

not entirely sure why you would use contruction script for a procedurally generated content as a child component.
as ManyBoxes’s transform would decide where they are even after they are spawned.(as you see it’s floating, and maybe do some crazy things.)

Maybe I misunderstand your intention, but try to use SpawnActor node, instead of a addChildActorComponent.

The root component is not moving because it is separate from the child actors you have created, and you are likely moving the child actors in runtime and not the root component. There simply isn’t anything moving the root. It’s the separate child actors that are simulating the physics. The root would need to be simulating physics as well and be tangible for the root to move.

I will specify my question.
When I set the ManyBoxes blueprint on the scene, all the child bluperint components has some coordinates. But when I press simulate button, all the boxes are moving to the other points, but there is nothing, that moves it. I checked it by migrating ManyBoxes.uasset and PhysicsBox.uasset in the other project, where the problem still was…

Summarizing the results: my problem is that all the child bluperints are moving somewhere without any reason.

Made a *.gif file that illustrates the problem - even if I will say the number of boxes to 1 - they always move away…
Gif1.gif

Try ticking the “manual attachement” box. It could be a double transform issue. Also, I noticed you are plugging that unit vector directly into transform - is that intentional?

No… That didn’t worked…
Can I send to you blueprints by E-Mail?

I found the problem! :slight_smile:
I tried to use wall sconce instead of PhysicsBox, and everything worked perfectly.
I checked the differences: PhysicsBox had only 1 component - static mesh, and wall sconce had 2 components (actually there is also a point light, but it doesn’t matter) - scene component and static mesh component.

WallSconce: Right.PNG

PhysicsBox: Wrong.PNG

When I added scene component to my PhysicsBox, the problem was solved.
Thanks to for your help!

P. S. Why the scene component was so important?

probably a bug, maybe you can send to answerhub’s bug section.

the box itself should already have a transformation component(from actor class), and scene component itself is just transformation(like an offset).

Hey Guys, thanks for letting us know about this. I tested it out and could reproduce it. I spoke with our developers and there are a few fixes for coming. I entered a report for issue specifically, but there is a good that it is already being worked on. I will let you know if anything develops. I am testing a potential fix right now.