57 - Pitch in Multiplayer
This commit is contained in:
parent
534cdfe902
commit
c090c0a37f
|
@ -185,6 +185,15 @@ void ABlasterCharacter::AimOffset(float DeltaTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
AO_Pitch = GetBaseAimRotation().Pitch;
|
AO_Pitch = GetBaseAimRotation().Pitch;
|
||||||
|
|
||||||
|
// Fix pitch/yaw compression
|
||||||
|
if (AO_Pitch > 90.f && !IsLocallyControlled())
|
||||||
|
{
|
||||||
|
// map pitch from [270, 360) to [-90, 0)
|
||||||
|
FVector2d InRange(270.f, 360.f);
|
||||||
|
FVector2d OutRange(-90.f, 0.f);
|
||||||
|
AO_Pitch = FMath::GetMappedRangeValueClamped(InRange, OutRange, AO_Pitch);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ABlasterCharacter::ServerEquipButtonPressed_Implementation()
|
void ABlasterCharacter::ServerEquipButtonPressed_Implementation()
|
||||||
|
|
Loading…
Reference in New Issue