It’s probably better to just stop them moving, though. Because they probably need to be able to look around, and maybe type something.
So you need a custom approach, and the way to do that is by changing the code inside the player.