Hello,
I’m quite new to UE4. I am trying to create a simple game in order to understand how the engine works. I made my game using blueprints only but now I’d like to use c++ only.
In this game I have points (floating cubes) and a ball that the user controls.
I am trying to make the ball able to interact with a point so that when is overlaps with one, I update the user score and hide the cube.
I wanted to make this in a UActorComponent so that it can be reusable and added to any actor (the point being, using something else than an Actor that I already used to make the cubes float).
Here are my ball and points configuration regarding overlaps :
The HandlePoint component has “auto activate” checked
The problem is, I can’t get access to overlapping components in this. I have tried multiple solutions :
GetOwner()->GetOverlappingComponents(OverlappingComponents);
UE_LOG(LogTemp, Warning, TEXT(“Number of overlaps : %d”), OverlappingComponents.Num());
in UHandlePoint::TickComponent()
I always get 0 overlaps
I tried :
void UHandlePoint::BeginPlay()
{
Super::BeginPlay();
mesh = (UStaticMeshComponent*)(GetOwner()->GetComponentByClass(UStaticMeshComponent::StaticClass()));
mesh->OnComponentBeginOverlap.AddDynamic(this, &UHandlePoint::HandlePoint);
}
But my delegate never gets called.
I think I am missing something, either on C++ side or on editor side but I don’t know what

