if (!Barrel) { return; }
FVector OutLaunchVelocity;
FVector StartLocation = Barrel->GetSocketLocation(FName("Projectile"));
if (UGameplayStatics::SuggestProjectileVelocity
(
this,
OutLaunchVelocity,
StartLocation,
HitLocation,
LaunchSpeed,
false,
0,
0,
ESuggestProjVelocityTraceOption::DoNotTrace
)
)
{
auto AimDirection = OutLaunchVelocity.GetSafeNormal();
auto TankName = GetOwner()->GetName();
UE_LOG(LogTemp, Warning, TEXT("%s is aiming at %s"),*TankName , *AimDirection.ToString());
}
I have a feeling you’re on Visual Studio 2019 16.3. Please update and rebuild.
Yes i am, thanks!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.