OnComponentBeginOverlap

Hi, what is the correct use of the OnComponentBeginOverlap in C++? I want to use the same Blueprint event, but in C++. Thanks.

In your begin play you register to the delegate:

MyComponent->OnComponentBeginOverlap.AddDynamic( this, &AMyClass::MyOverlapFunction );

Where MyOverlapFunction has the signature:
void MyOverlapFunction( class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult );

I recommend checking out the PrimitiveComponent header to see the signatures of the other collision delegates.

Cheers,

Thanks, now it works!