Remove unnecessary testing
This commit is contained in:
parent
bff484f139
commit
596bae1855
|
@ -242,16 +242,8 @@ void APlayerCharacter::CalculateHits(TArray<FHitResult>* hits)
|
||||||
// Calculate starting position and direction
|
// Calculate starting position and direction
|
||||||
FVector TraceStart;
|
FVector TraceStart;
|
||||||
FRotator PlayerRot;
|
FRotator PlayerRot;
|
||||||
|
|
||||||
APlayerController* Con;
|
GetController<APlayerController>()->GetPlayerViewPoint(TraceStart, PlayerRot);
|
||||||
Con = GetController<APlayerController>();
|
|
||||||
|
|
||||||
if (!Con)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Con->GetPlayerViewPoint(TraceStart, PlayerRot);
|
|
||||||
TraceStart = GetRootComponent()->GetComponentLocation();
|
TraceStart = GetRootComponent()->GetComponentLocation();
|
||||||
FVector AimDir = PlayerRot.Vector();
|
FVector AimDir = PlayerRot.Vector();
|
||||||
TraceStart = TraceStart + AimDir * ((GetInstigator()->GetActorLocation() - TraceStart) | AimDir);
|
TraceStart = TraceStart + AimDir * ((GetInstigator()->GetActorLocation() - TraceStart) | AimDir);
|
||||||
|
|
Loading…
Reference in New Issue