绑定语句
:OnHit会出现问题
OnComponentHit.AddDynamic(this, &AFPSProjectile::OnHit);
然后onHit函数定义应该这样去写:
void OnHit( UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
下面是查找过程: