Hello (as usual, please let me know if I get the terminology wrong here),
I was just looking back over this project, and I noticed that in ProjectileBase’s OnHit() delegate function, we check that OtherActor is valid. I was confused for a moment about how the function gets OtherActor, and then remembered that the following line passes in the arguments from the OnComponentHit function.
ProjectileMesh->OnComponentHit.AddDynamic(this, &AProjectileBase::OnHit);
I can see where this is declared in the PrimitiveComponent.h, but I don’t understand where it’s defined(?) in the PrimitiveComponent.cpp file. That leaves me still wondering how OnHit() ultimately manages to get and check whether OtherActor is valid.