Camera wont lock when opening inventory

Right now, I am following this guide to build an inventory system: https://www.youtube.com/watch?v=0tPmMVFlFZc&list=PLr-BtIHhMClFtelWGOv3AUYH4dQw7fc-I&ab_channel=Dennis

He gets to a point where he adds the code

   if (!inventoryUi.InventoryOpen)
            {
                RotateView();
            }

into the first person controller, but the controller is the outdated(?) FPS controller, as the one I have is just the modular first person controller that you can import in unity. Since this is older code, and the current controller i use does not have the RotateView command, how do I get the same effect?

Perhaps by cross-implementing RotateView in the controller you’re using??

Since that method takes no arguments, I can only guess it does something pretty global and simple like align your character to the identity rotation perhaps? Otherwise you would need to know what that RotateView() method does.

One simple way to rotate a thing is to set its tranform.forward to the direction you want it to face.