Here is the code i used for 2 new First Person Shooter template
this problem only occurs on version 4.25 not 4.24.3
2.24.3 works fine an I have to shoot the character for it to register a hit
But in 2.25 if I shoot 40 units near a character it triggers a Hit
Would this have anything to do with the default Multiplayer setting for 2.25
TArray<FHitResult> HitResults;
HitResults.Init(FHitResult(ForceInit), 12);
FVector Start = CameraComponent->GetComponentLocation();
FVector ForwardVector = CameraComponent->GetForwardVector();
FVector End = (ForwardVector * 5000) + Start;
FCollisionQueryParams CollisionQueryParams;
CollisionQueryParams.AddIgnoredActor(this);
FCollisionResponseParams ResposeParams(ECollisionResponse::ECR_Overlap);
GetWorld()->LineTraceMultiByChannel(HitResults, Start, End, ECC_Visibility, CollisionQueryParams, ResposeParams);
/*if (HitResults.Num() > 0)
{
//CreatBulletHole(&HitResults[0]);
}*/
for (int x = 0; x != HitResults.Num(); ++x)
{
if (ACharacter* Player = Cast<ACharacter>(HitResults[x].Actor.Get()))
{
GEngine->AddOnScreenDebugMessage(-1, 0.5f, FColor::Green, TEXT("Array character"));
}
}