3.4 - Getting Projectiles to Interact with the World
http://api.unrealengine.com/CHN/Programming/Tutorials/FirstPersonShooter/3/4/index.html
需做以下修正:
1.碰撞响应函数的定义
UFUNCTION()
void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult& Hit);
2.需要将CollisionComponent->OnComponentHit.AddDynamic(this, &AFPSProjectile::OnHit)从构造函数移到PostInitializeComponents中
3.设置CollisionComponent的碰撞类别为Projectile(而不是官网写的设置ProjectileMeshComponent )