I am learning UE5.4,but the CapsuleComponent doesn’t have function AddDynamic().So how can i implement this function is new API.
Hey there! I think that this is what you are trying to do:
CapsuleComponent->OnComponentBeginOverlap.AddDynamic(this, &ThisClass::SomeFunctionYouWantToFire)
You have to access the delegate from the CapsuleComponent first, and then, you have access to the AddDynamic method that let’s you bind any UFUNCTION to it.
Let me know if that helped!
Cheers,
David