How to freeze camera?

hello Im from south KOREA so my english skills are veryyyyy terrible…ㅠㅠ

I watched the Notch demo 2 - YouTube youtube and I want to freezing camera like penumbra or amnesia I mean if I open the door or open the desk my camera is freeze

but now my camera is move I open the door but my camera is move so I want to freeze camera like this video How to can I freeze Camera?! (If i press “Q” camera is freeze and my Dragrigidbody can open the door )
please I usually use JS but C# it is ok :smiley:

P.S I used just Main camera on my Player

As in my first comment, when you press Q also disable the movement part of the script. A simple boolean check would do it. Then when the drawer has finished moving, reset the boolean.

If you post your script to show what you are doing, maybe you can get better help. But we are not here just to write and give away scripts. It is pretty much impossible just to write a generic script with the information you have given anyway.