Skip to content

Limiting all cannon views to 72 degrees max visible FOV#1852

Open
GarlicAAZ wants to merge 5 commits intomasterfrom
feature-cannon-view-fov-limit
Open

Limiting all cannon views to 72 degrees max visible FOV#1852
GarlicAAZ wants to merge 5 commits intomasterfrom
feature-cannon-view-fov-limit

Conversation

@GarlicAAZ
Copy link
Copy Markdown
Collaborator

@GarlicAAZ GarlicAAZ commented Nov 30, 2025

This is to mitigate the effect of fog visibility bug, that gets dramatically worse if players are allowed to use their "default" FOV (can be as high as 100) inside cupola/viewport views.

Currently there are many instances on maps where players who are aware of this can gain tremendous view distance advantage by taking a good tank destroying vehicle, then simply turning their view inside cupola (or similar) with default FOV set to 100, and then see all the enemies long before the enemies can see them, and essentially eliminate all enemy armor as a threat completely unless they manage to arty strike him or come from an unexpected angle. This is an extremely unfair and totally unintuitive advantage that can easilly and completely ruin the experience for new and even not-so-new players, from whos' perspective they just get killed from nowhere repeatedly and they have no chance of responding no matter how hard they look into the fog wall.

This obviously does not fix the bug, but it should significant mitigate the most game breaking abuse that it creates, as this cupola view trick isnt even something you can do with normal infantry weapons that are always pointed around the center of the screen. On many maps such tank destroying vehicles with cupola views are strategically important and can cause total domination on the map if used with that glitch, single handedly defining the outcome of the round.

The difference between extended view range when looking at the side of the screen, with FOV set to 72 and 100, is about 26%, which is a lot. Limiting cannon views' FOV to 72 at least makes it much more likely for the potential victims to spot the shooter before or while they get shot, especially if they are infantry or driving vehicles (this change doesnt affect driver views).

https://www.youtube.com/watch?v=Mn0tKgPSBFM
This video shows an example of current day fog abuse, albeit not the most effective one. Note that this is an exposed view from SU76, as opposed to hidden view in various tank cupolas and periscopes, as well as that in that particular view the camera doesnt rotate with the gun, but it does rotate in turreted tanks.

Note: some scope views are set to 75 or 85 degrees, but these have interface images that limit the view additionally

Another note: some cupola views were selectively/inconsistently set to a lower value of 75 while other tanks had unrestricted FOV in their cupolas. They are now consistently set to 72.

its very simple but seems to work.
To dos: test all cannons + (may be?) do something about the changing fov settings while in gun sight bug
Comment thread DH_Vehicles/Classes/DH_IS2CannonPawn.uc Outdated
DriverPositions(1)=(ViewLocation=(X=0.0,Y=0.0,Z=14.0),ViewFOV=75.0,PositionMesh=SkeletalMesh'DH_IS2_anm.IS2-turret_ext',DriverTransitionAnim="VIS2_com_idle_close",ViewPitchUpLimit=2731,ViewPitchDownLimit=64080,ViewPositiveYawLimit=65536,ViewNegativeYawLimit=-65536,bDrawOverlays=true)
//TO-DO: add some animations to transition from periscope view
DriverPositions(2)=(ViewFOV=75.0,PositionMesh=SkeletalMesh'DH_IS2_anm.IS2-turret_int',DriverTransitionAnim="VIS2_com_close",TransitionUpAnim="com_open",ViewPitchUpLimit=4000,ViewPitchDownLimit=64500,ViewPositiveYawLimit=65536,ViewNegativeYawLimit=-65536)
DriverPositions(2)=(ViewFOV=72.0,PositionMesh=SkeletalMesh'DH_IS2_anm.IS2-turret_int',DriverTransitionAnim="VIS2_com_close",TransitionUpAnim="com_open",ViewPitchUpLimit=4000,ViewPitchDownLimit=64500,ViewPositiveYawLimit=65536,ViewNegativeYawLimit=-65536)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, just removing the ViewFOV variable here should fall back to the default, so there's no need to re-specify it. Same goes for all the other instances below.

if (IsHumanControlled())
{
return PlayerController(Controller).DefaultFOV;
return 72;
Copy link
Copy Markdown
Member

@cmbasnett cmbasnett Nov 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally don't like to have floating "magic" numbers in functions like this. Make this either a named constant or a variable on this class. I suggest DefaultFOVMax, then you can use the FMin function against the player's default FOV set in settings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, this should probably be limited to just tank cannons instead of all vehicle weapon pawns since this also includes passengers which should not have their FOV constrained in the same way.

@GarlicAAZ GarlicAAZ requested a review from cmbasnett December 4, 2025 11:18
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