I am creating a class in c++ for a base of a later used blueprint. Somehow if I have created a Blueprint of it, moving the root component does not affect the child component (the static mesh component).
So I would guess its because of my code from the inherited class. This is what I am using within the constructor:
// Create a dummy root component we can attach things to.
RootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent"));
// Create a static mesh object
building = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Building"));
building->SetupAttachment(RootComponent);
But this does not work. I can also see this, when I am dragging the Blueprint into the level, the mesh always spawns at the origin and don’t follow the mouse while dragging.