Great information and in my case what would You recommend for me me I think later I will need Integers in my logic, and I am in trouble to set the
GetControlRotation().Yaw = LocTopVlue;
GetControlRotation(); is const
if You can help thank You.
bool MyCharacter::LimitPitchAngle(float Axis)
{
float LocBottomValue;
float LocTopVlue;
//Calculate the pitch limit values for the directions up / down in several poses
if (_bProne)
{
LocBottomValue = 290.0f;
LocTopVlue = 75.0f;
}
if (GetControlRotation().Yaw > LocBottomValue || GetControlRotation().Yaw < LocTopVlue)
{
if (abs(-LocTopVlue) < abs(-LocBottomValue))
{
GetControlRotation().Yaw = LocTopVlue;
}
}
}