Hey there, just started messing around with the codebase and I’ve been running into the some of the same issues with the Control Rotation. Fairly certain the entire control orientation flips upside down (well, definitely flips, not necessarily completely upside down) as soon as the orientation of the character passes 90 degrees off of regular World-Z.
Re: Control-Up becomes Control-Right.
Control-Right becomes Control-Down.
Edit:
I’ve gone through a couple of different iterations of directly setting the Control Rotation to have the same values as my capsule rotation in the update tick, and I am pretty convinced that it is being reset to something else after that point. It’s strange though, because I’ve tried just modifying the roll to compensate for the apparent error, offsetting the rotation by 90 degrees, but it just refuses to let the up vector for the control rotation be World down. What’s more, I can’t directly offset the roll to arbitrary values (re: 45, 37, 12, etc…) but some of the multiple-of-90 rotations DO rotate the frame (while we’re upside down), just never to the desired orientation. More experimentation to follow.
Right now the most likely culprit is the UpdateRotation call in the base PlayerController.
Edit:
Alright, figured it out (for the most part), and I was close.
It was the ProcessViewRotation call from the PlayerCameraManager in the UpdateRotation call, specifically, these:
// PlayerCameraManager.cpp : 1124-1130
else
{
// Limit Player View Axes
LimitViewPitch( OutViewRotation, ViewPitchMin, ViewPitchMax );
LimitViewYaw( OutViewRotation, ViewYawMin, ViewYawMax );
LimitViewRoll( OutViewRotation, ViewRollMin, ViewRollMax );
}
In the default player camera manager, the control rotation values for pitch, yaw, and roll are capped to -90,90], [0,360], and -90,90], respectively, and gets called every update tick. So, once I commented out these calls, I was able to directly update the control rotation to whatever I wanted. I might go back and fix it up a little better s.t. I don’t need to reassign the control rotation every tick (or just change the limits in my camera manager), but at the very least I’ve got it working for my purposes right now. It’s still pretty hacky.