I’m trying to use on component fracture event with C++, I used the on component fracture variable as a delegate but the Add Dynamic syntax is giving me an error and also I’m not sure what parameters I should use with the function I’m gonna call … any clue what should I do?
Source\ApexDestruction\Public\DestructibleComponent.h
Delegate expects two FVector arguments:
/** Delegate for notification when fracture occurs */
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FComponentFractureSignature, const FVector &, HitPoint, const FVector &, HitDirection);
Solution at given time: [C++] Unreal Engine 4 - Playlist Part 8 - Destruction with debris decay - YouTube
UFUNCTION()
void OnComponentFracture(const FVector& HitPoint, const FVector& HitDirection);
// ...
YourComponent->OnComponentFracture.AddUniqueDynamic(this, &AYourClass::OnComponentFracture);
Thanks that worked, Everything was the same but the word (const ) …