BoxCollider as root component C++ bug

Hi!

For a school assignment I have to create some parts of my game in C++ and I think I discovered a bug in the engine.

Down below we have 3 flags.

The left one is a blueprint where the root is a BoxCollider and a static mesh as a child.

The middle one is made with C++ and has a BoxCollider as the Root with a static mesh as a child.


The last one is made with C++ and has a Static mesh as the root with a BoxCollider as a child.


In the editor everything gets rendered correctly, but when I tested the packaged version this was the result.

Does anyone know why/how this happens?
(Version 4.27.2)

In the second case, why do you call AttachToComponent() instead of SetupAttachment()?

I don’t think that AttachToComponent() works properly in the constructor.

Hi, I did originally use SetAttachment but that didn’t seem to work. I used the same procedure as in the “DynamicTerrainBase” originally.