Trivial Rotations not working

I am creating a 2D game where the character walks around a square planet. When trying to rotate the character, it rotates smoothly from North, West, East and back. The problem arises when I rotate it south from either the west (Euler angle notation: 90, 0, 0) or east (-90, 0, 0) side, the character rotates smoothly and appropriately, however now it doesn’t rotate fully in the south side. It rotates to -85, 180 -180 (all rotations are on the Y axis or pitch if I am not mistaken). I first started using Blueprints but now am coding it. This is the simple function that handles rotation.


void ACodeOrvoCharacter::handleRotation()
{
	float TargetPitch = 0.0f;
	switch (gstate)
	{
	case EGravityState::GS_NORTH:
		break;
	case EGravityState::GS_EAST:
		TargetPitch = -90.0f;
		break;
	case EGravityState::GS_WEST:
		TargetPitch = 90.0f;
		break;
	case EGravityState::GS_SOUTH:
		TargetPitch = 180.0f;
		break;
	}
	FRotator CurrentRot = GetActorRotation();
	CurrentRot.Roll = 0.0f;
	CurrentRot.Yaw = 0.0f;
	FRotator TargetRot(TargetPitch, CurrentRot.Yaw, CurrentRot.Roll);
	FQuat desired = FQuat::Slerp(CurrentRot.Quaternion(), TargetRot.Quaternion(), 0.10f);
	//CurrentRot = FMath::Lerp(CurrentRot, TargetRot, 0.10f);
	this->SetActorRotation(desired);
}

I thought I was misusing the Quaternions somehow, but in recent development I was able to get it to work by tweaking the camera and spring arm settings. After wanting to understand it more I attempted to use Euler rotations instead of quaternions in the working project and it didn’t. After switching back to quaternions (just commenting out the one euler line and uncommenting the quaternion line) it still didn’t work. Not sure what is wrong! Help would be greatly appreciated as I am at a loss.

There is a lot more info on this thread I posted previously on!