fix: fixed projectile flight direction
Shooting ignored vertical rotation of controller. Fixed and simplified code.
This commit is contained in:
parent
b7263615c0
commit
c9914f14ea
|
|
@ -64,10 +64,8 @@ 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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user