Why won't UDrawSphereComponent move in editor?

Hi there folks,

Built my editor from 4.1 source and I’m having a strange issue.
I’ve created a class called Node_Navigation which extends off of AActor.
In the header file I define a UDrawSphereComponent so that I can visualise where the node is placed in the editor (as it will have no StaticMesh).


UPROPERTY(VisibleAnywhere, Category ="UDrawSphereComponent")
TSubobjectPtr<UDrawSphereComponent>  RadiusComponent;


PrimaryActorTick.bCanEverTick = true;

RadiusComponent = PCIP.CreateDefaultSubobject<UDrawSphereComponent>(this, TEXT("RadiusComponent"));
	RadiusComponent->ShapeColor = FColor::Black;

Everything compiles correctly, when I get in the editor and drop a Node_Navigation into the world, it spawns at world zero and while I can move the component around , the UDrawSphereComponent doesn’t follow. Any leads ?

#Make it the RootComponent

RootComponent = RadiusComponent;

or if you have other components, one of which already is the RootComponent


RadiusComponent->AttachParent = RootComponent;



That did the trick , thank you for sharing Rama ! :slight_smile:

Hee hee!