FVector AFPSChar::ShootLineTrace(FVector traceStart, FVector traceEnd)
{
LineTraceHit = UKismetSystemLibrary::LineTraceMultiForObjects((), FirstPersonCamera->GetComponentLocation(), (FirstPersonCamera->GetComponentLocation() + (FirstPersonCamera->GetForwardVector() * WeaponInventory[InventoryIndex].ShootRange)), ShootTraceTypes, false, ActorsToIgnore, EDrawDebugTrace::ForDuration, HitResults, true);
if (HitResults.Num() > 0)
{
SpawnBullet((TPGun->GetSocketLocation("Muzzle")), UKismetMathLibrary::FindLookAtRotation(TPGun->GetSocketLocation("Muzzle"), SelectVector(HitResults[0].ImpactPoint, HitResults[0].TraceEnd, LineTraceHit)));
return SelectVector(HitResults[0].ImpactPoint, HitResults[0].TraceEnd, LineTraceHit);
}
else
{
return FVector(0.f, 0.f, 0.f);
}
}
this is the function ran on the server that isnt working. The line is still being fired upward like in the 3rd picture above