Here is the solution for C++ multiplayer, but please help and describe the math, I would really appreciate that!
void ACPP_1Character::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (!IsLocallyControlled()) {
FRotator NewRot = FirstPersonCameraComponent->RelativeRotation;
NewRot.Pitch = (uint8)RemoteViewPitch * 360.f / 255.f; // to compress to 1 byte [edited to help others]
FirstPersonCameraComponent->SetRelativeRotation(NewRot);
}
}
But please explain me why do use this math
And if I am right this one:
, is used to not do for you character, because you do not need it, and it is already happening or not?
I only catch on 360°(degrees), and 255 is the limitation of uint8
Why is RemoteViewPitch is 255 only instaed of 360 (to save some memory or what?)