Skip to content
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

[Feature Request] A Viewmodel FOV Setting #1600

Closed
juuuulian-s opened this issue Feb 3, 2024 · 6 comments
Closed

[Feature Request] A Viewmodel FOV Setting #1600

juuuulian-s opened this issue Feb 3, 2024 · 6 comments

Comments

@juuuulian-s
Copy link

A command that handles viewmodel FOV independently from screen FOV, allowing for high screen FOV with minimal viewmodel clipping.

@nekonomicon
Copy link
Member

I'm not sure what you need.
Engine has r_adjust_fov cvar for HD screens already.

@Velaron
Copy link
Member

Velaron commented Feb 15, 2024

This is not possible as the weapon is rendered as a part of the world

@juuuulian-s
Copy link
Author

What about adjusting the near clipping plane? This way theres no need to mess with FOV settings, as the clipping is the main reason I made this request in the first place.

@a1batross
Copy link
Member

@juuuulian-s can you provide an example where current near clipping value isn't enough?

I don't see any reason to go lower than 4 units, as it's the default value used in Quake and GoldSource.

@a1batross
Copy link
Member

I also only notice near clipping when the FOV values go higher than 130 which is already unplayable by itself as it breaks default view models.

Not sure about drawing viewmodel with separate FOV. Mods with custom renderers can implement it the way they want. If some Xash3D-based game that relies on standard renderer wants it, it might get implemented. If not and you need it just for fun, I don't see reason to make standard renderer any more complicated than it already is.

@a1batross
Copy link
Member

Turns out, it's quite easy to implement, just by changing projection view matrix before drawing viewmodel and restoring it back.

But field of view is controlled by the game code. Games and mods that modify player's field of view were designed in mind that viewmodel fov will be equal to everything else.

I think, this can be implemented as an extension to ref_params_t structure, similar to how fov_x and fov_y are added at the end of struct. If anybody wants this for their mod, they can open a new issue.

@a1batross a1batross closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2024
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

No branches or pull requests

4 participants