How do i lock the player character in a position with a mesh, and then unlock and walk around when i press a button?

so i want the player to be sitting in a chair when the game starts. how do i lock the player to the chair mesh so only he can look around and not move? and also how can i unlock the player character from the mesh with the press of a button?

First person or third person?

third person

Well, assuming you have the character sitting in the chair, you can turn off directional movement without turning off look, in the controller:

How do I do the same for firstperson?