Quick summary
The viewmodel is the weapon and hands you see in first person. CS2 moves it with four console variables plus a preset command, and Valve publishes the current list and default values on the Valve Developer Community. None of these commands change recoil, spread, or hit registration. They only change how much of your screen the gun covers.
Turning the console on
Settings, then Game, then Enable Developer Console. It defaults to the tilde key. Everything below is typed into that console.
The four offset commands
Valve lists these with their default values:
- viewmodel_fov, default 60. How wide the viewmodel camera is. A higher number shows the weapon from further back, so it looks smaller on screen.
- viewmodel_offset_x, default 1. Moves the weapon left or right.
- viewmodel_offset_y, default 1. Moves the weapon forward or back.
- viewmodel_offset_z, default -1. Moves the weapon up or down.
The preset command
viewmodel_presetpos, default 1. Valve documents three values: 1 is Desktop, 2 is Couch, and 3 is Classic. Typing the command with one of those numbers snaps the weapon to a known starting position, which is faster than nudging three offsets one at a time.
Two commands worth knowing
- viewmodel_offset_randomize, default false. Valve describes it as randomly changing the viewmodel offsets to visualise the range. Turn it on and the weapon jumps around the full legal range, so you can see where the extremes sit before you pick numbers.
- r_drawviewmodel, default true. Renders the view model on or off. Valve marks it as a cheat command, so it will not run on matchmaking servers.
The flag column in Valve's list marks viewmodel_fov, the three offsets, and viewmodel_presetpos with an "a". That is the archive flag, and archived variables are written to your config instead of being reset when you close the game. Set them once and they should survive a restart.
A note on sensitivity
sensitivity, default 2.5, sits in the same list. It is a separate topic from the viewmodel, and changing it does not move the weapon.
Sources
Valve Developer Community: List of Counter-Strike 2 console commands and variables