diff --git a/Source/Nakatomi/Pickup.cpp b/Source/Nakatomi/Pickup.cpp index 80b425d..e4227f0 100644 --- a/Source/Nakatomi/Pickup.cpp +++ b/Source/Nakatomi/Pickup.cpp @@ -18,8 +18,7 @@ APickup::APickup() SphereComponent = CreateDefaultSubobject(TEXT("SphereComponent")); SphereComponent->SetSphereRadius(25.0f, true); SphereComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndProbe); - - SphereComponent->SetupAttachment(RootComponent); + SetRootComponent(SphereComponent); PointLightComponent = CreateDefaultSubobject(TEXT("PointLightComponent")); PointLightComponent->SetupAttachment(RootComponent);