Ignoring player collision with its projectile collision.

I use the method similar to what is found in the ShooterGame Example:



void AShooterWeapon_Projectile::ServerFireProjectile_Implementation(FVector Origin, FVector_NetQuantizeNormal ShootDir)
{
    FTransform SpawnTM(ShootDir.Rotation(), Origin);
    AShooterProjectile* Projectile = Cast<AShooterProjectile>(UGameplayStatics::BeginSpawningActorFromClass(this, ProjectileConfig.ProjectileClass, SpawnTM));
    if (Projectile)
    {
        Projectile->Instigator = Instigator;
        Projectile->SetOwner(this);
        Projectile->InitVelocity(ShootDir);

        UGameplayStatics::FinishSpawningActor(Projectile, SpawnTM);
    }
}


You can take it further by forcing components of the player to ignore the bullet too:



    if (UPrimitiveComponent* PrimitiveComp = Cast<UPrimitiveComponent>(GetOwner()->GetRootComponent()))
    {
        PrimitiveComp->MoveIgnoreActors.AddUnique(this);
    }