Sorry for the delay in getting back to you. The original bool, ‘bOrientRotationToMovement’, provided the freedom to move the camera around without changing the direction the character was facing. In this case the facing of the character is based on the direction it is moving, which wasn’t quite what you were looking for. The bool that I suggested using instead ties the facing of the character to the direction the camera is looking, which gives you the ability to perform strafe movement. They are essentially opposites:
- Independent camera movement, character facing tied to direction of movement.
- Independent movement, character facing tied to camera.
In both cases, movement direction is related to where the camera is looking. If ‘bUseControllerDesiredRotation’ gives you the majority of what you are looking for, I would go ahead and just use that. For those times when you want to be able to rotate the camera without changing the character’s facing, it depends on what your character is able to do at the same time. If this will only happen when the character is not moving, you can use the following line to disable the character’s rotation when turning the camera:
CharacterMovement->RotationRate = FRotator(0.0f, 0.0f, 0.0f);
Just make sure to reset RotationRate when the character moves again (or once you no longer want to be able to rotate the camera independently of the character’s facing):
CharacterMovement->RotationRate = FRotator(0.0f, 540.0f, 0.0f);
Alternatively you can alternate which bool value is true (keep in mind that if both are true, then bOrientRotationToMovement takes precedence). This might be the simplest option if you will want to be able to rotate the camera independently of the character’s facing while the character is moving. It will probably take some tweaking and experimentation to find out what works best for your needs.