Fixed weapon system information bug

This commit is contained in:
MARCEL HARA 2023-10-23 11:29:48 +01:00
parent fd41495cc7
commit 37c93fcfe8

View File

@ -79,6 +79,8 @@ void AEndlessVendettaCharacter::WeaponPickUpSystem()
FHitResult OutHit;
FCollisionQueryParams QueryParams = FCollisionQueryParams::DefaultQueryParam;
QueryParams.AddIgnoredActor(this);
QueryParams.AddIgnoredActor(PrimaryWeapon);
QueryParams.AddIgnoredActor(SecondaryWeapon);
FVector LT_Start = FirstPersonCameraComponent->GetComponentLocation();
FVector LT_End = LT_Start + (FirstPersonCameraComponent->GetForwardVector() * InteractionRange);
if (!GetWorld()->LineTraceSingleByChannel(OutHit, LT_Start, LT_End, ECC_Camera, QueryParams)) return;