Hi, what is the correct use of the OnComponentBeginOverlap in C++? I want to use the same Blueprint event, but in C++. Thanks.
asked Jan 21 '15 at 05:50 AM in C++ Programming
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.
answered Jan 21 '15 at 07:45 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here