Attaching Box Collision to Default Scene Root?

How do I attach a box collision to the default scene root in C++ so that it looks like the picture:

When I initialize my box component it automatically becomes the root and I lose the default scene root

I don’t think there is such a thing as a “DefaultSceneRoot” in C++.
Why don’t you just make a new USceneComponent, set that as RootComponent, and attach the box to that?

If I can do it in blueprints, how is that not possible to do in C++

I tried what you said but when I bring the actor in the world it doesn’t have the white sphere on the object that occurs when creating a blueprint class. This object does not have a static mesh and without the white sphere it is annoying to click on in the scene. See picture below. That’s essentially the problem I am trying to solve.

unreal

Of couse it’s possible to do in C++, it’s just not the default behavior. To make the component have the billboard sprite in the editor, try setting its bVisualizeComponent variable to true.

Ah gotcha! Thanks so much!! I’m just looking for the white sphere. I’ll try your solution