Hello everyone,
I have a USceneCompoent* set as my RootComponent on my actor and then a UStaticMeshCompoent attatched to with SetupAttachment(); However when I make a blueprint and drag it into the level, the RootComponent goes to where I move it in the level but the attached static mesh just goes to and stays at world origin (0,0,0), can someone help?
header
UPROPERTY(VisibleAnywhere, Category = "Mesh")
class UStaticMeshComponent* BuildMesh;
UPROPERTY(VisibleAnywhere, Category = "Scene Root")
class USceneComponent* SceneRoot;
CPP constructor
APlacable::APlacable()
{
PrimaryActorTick.bCanEverTick = true;
SceneRoot = CreateDefaultSubobject<USceneComponent>(TEXT("Scene Root"));
SetRootComponent(SceneRoot);
BuildMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Build Mesh"));
BuildMesh->SetupAttachment(RootComponent);
}