diff --git a/Source/Exo/Private/Characters/Components/ShootingComponent.cpp b/Source/Exo/Private/Characters/Components/ShootingComponent.cpp index c406cfa..1eb3226 100644 --- a/Source/Exo/Private/Characters/Components/ShootingComponent.cpp +++ b/Source/Exo/Private/Characters/Components/ShootingComponent.cpp @@ -63,11 +63,9 @@ void UShootingComponent::MeleAttack() } AActor* UShootingComponent::ExecuteLineTrace(float LineRange) -{ - FVector ForwardVector = PlayerCharacter->GetActorForwardVector(); - FVector ViewLocation; - FRotator ViewRotation; - PlayerCharacter->GetController()->GetPlayerViewPoint(ViewLocation, ViewRotation); +{ + FVector ForwardVector = CameraManager->GetActorForwardVector(); + FVector ViewLocation = CameraManager->GetCameraLocation(); FVector EndVector = ViewLocation + ForwardVector * LineRange;