Skip to content

[TF2] Add client ConVars for changing viewmodel position and angle offsets #1433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bradasparky
Copy link

Description

Currently, the only option for modifying your viewmodel offset is tf_use_min_viewmodels, which is a hard coded z value. This PR allows players to modify their viewmodel offsets however they want.

Added ConVars
- viewmodel_offset_x
- viewmodel_offset_y
- viewmodel_offset_z
- viewmodel_offset_pitch
- viewmodel_offset_yaw
- viewmodel_offset_roll

Notes

  • Modified tf_viewmodels_offset_override to include angle arguments.
  • When tf_use_min_viewmodels 1 is used with a non-zero value of viewmodel_offset_z, both offsets will be added together.
  • Works with +inspect and weapon lowering during the game over round state or when in TF_COND_PHASE.
viewmodel.offset.showcase.mp4

@copperpixel
Copy link
Contributor

IMO it would be better to do this in baseviewmodel_shared and apply it to other games similarly to Valve's implementation in Alien Swarm

@Bradasparky
Copy link
Author

IMO it would be better to do this in baseviewmodel_shared and apply it to other games similarly to Valve's implementation in Alien Swarm

I'll look into doing that. I see that the Alien Swarm SDK's baseviewmodel_shared.cpp has the same positional offset convars.

Bitl added a commit to BitlDevelopmentStudios/source-sdk-2013-bds-base that referenced this pull request Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants