How to lock rotation of camera or pause game in c++

Hi

Sorry if this question has an obvious answer, I am still new to c++ and UE4 programming.

I get rotation through this code in my player controller:

InputComponent->BindAxis("Turn", this, &AGAME_Character::AddControllerYawInput); InputComponent->BindAxis("LookUp", this, &AGAME_Character::AddControllerPitchInput);

How can I lock the rotation of the camera when I have opened my c++ based inventory widget?

Or is it possible to pause the game and still have UI functionality? (And then unpause by pressing the inventory button on the keyboard again)

I have locked movement with a bool in the movement code. The camera movement is in Pawn.cpp but, is there a way to lock rotation without editing engine code inside of c++, so that I can update the engine version and use the code in other projects easily?

The player controller code is based upon: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Make plugin with Pawn base class with overrided function of what you want to change and use that pawn class to make your pawns. Or/and override ACharacter too if you need to modify that class too

Thank you, hadn’t considered overriding it.
I was able to do this inside of my player controller code