FVector startPos = 소환위치(FVector);
float maxRange = 10000.f;
// 카메라 기반으로 구하기
auto cameraManager = UGameplayStatics::GetPlayerCameraManager(GetWorld(), 0);
auto traceStartPos = UKismetMathLibrary::ProjectPointOnToPlane(cameraManager->GetCameraLocation(), startPos, cameraManager->GetActorForwardVector());
auto traceEndPos = traceStartPos + (cameraManager->GetActorForwardVector() * maxRange);
// 게임 뷰포트 가운데 지점 구하기
FVector2D vPortCenterPos = GEngine->GameViewport->Viewport->GetSizeXY() / 2.f;
FVector deprojPos, deprojDir;
UGameplayStatics::DeprojectScreenToWorld(UGameplayStatics::GetPlayerController(GetWorld(), 0), vPortCenterPos, deprojPos, deprojDir);
FVector rayStartPos = cameraManager->GetCameraLocation();
FVector rayEndPos = deprojPos + (deprojDir * maxRange);
FHitResult hitResult;
auto bTraced = GetWorld()->LineTraceSingleByChannel(hitResult, rayStartPos, rayEndPos, ECollisionChannel::ECC_Visibility);
FVector endPos = UKismetMathLibrary::SelectVector(hitResult.ImpactPoint, hitResult.TraceEnd, bTraced);
DrawDebugLine(GetWorld(), startPos, endPos, FColor::Red, true);