# Zoom sensitivity

18 Aug 2017Hello OA-people! Today Guild has some game and config information to share with you.

Have you ever felt that the sensitivity in game when zooming doesn’t feel quite the same as when you are unzoomed? You are probably not alone.

The zoom sensitivity formula in OpenArena `vertical_fov / 75.0`

. This formula is
a bit flawed if your want to preserve the exact same sensitivity feeling when
playing zoomed and unzoomed. There is a better and more correct formula
explained below!

## What is wrong how could it be better?

The first way in which the builtin `+zoom`

formula is flawed is that it assumes
the vertical FOV is 75. This is eqvivalent to approximently 91 Hor+ FOV. The
other way the formula is flawed is that it scales the formula linearly using
`newfov / oldfov`

The mathematically correct formula is `tan(newfov / 2) / tan(oldfov / 2)`

. In
this formula it doesn’t matter if vertical of horizontal FOV is used for the
calculation as the result will be the same.

This formula can be proven by drawing a triangle with the points A, B and C. The
angle at point A is the FOV divided by 2 and the side BC is half of the viewport
where the players view gets projected. To calculate the ratio of the size of the
viewport when the angle A changes you can use the formula ```
tan(new_A) /
tan(old_A)
```

. Substitue `new_A`

for `newfov / 2`

and `old_A`

for `oldfov / 2`

to
get the sensitivity scaling formula.

## So how does this affect you in the game?

With a script using `xdotool`

to move the mouse exactly the same distance when
zoomed in and zoomed out, shooting to mark positions and taking screenshots we
can see exactly how much of a difference it makes.

On the upper row of the picture we use the mathematically correct formula
`tan(newfov / 2) / tan(oldfov / 2)`

. As you can see the 2 dots in the middle
line up on all pictures which shows that this formula works.

On the lower row we use the linnear scaling formula of `new_vfov / old_vfov`

(the one OpenArena currently uses for `+zoom`

). As you can see the dots does not
align as well as when using the other formula.

## How do you fix this?

If you feel like using `+zoom`

makes your aim worse, you can make config that
changes your zoom sensitivity using the optimal formula. But doing this requires
you to switch to a zoom-bind that you press to toggle the zoom instead of
holding for it. Instructions on how to do that has been created here on the
OpenArena
wiki.

You might also prefer that the mouse sensitivity feels a bit slower zoomed than
unzoomed, or you have maybe gotten used to the zoom sensitivity of `+zoom`

.
Then it might not be worth changing.

## Bonus tip!

If you ever want to change your `cg_fov`

you can use this formula to preserve
your exact mouse feeling when doing the switch! This should preserve you current
muscle memory for flick shots.

You can use `fovsenscalc`

script here to
calculate what your new sensitivity and acceleration values should be using the
optimal formula.

Example:You are playing with

`cg_fov 90`

,`sensitivity 3.75`

, and`cl_mouseAccel 0.5`

. What should`sensitivity`

and`cl_mouseAccel`

be if you switch to`cg_fov 110`

?Use the script as follows (

`$`

is shell-prompt):`$ ./fovsenscalc --new-fov 110 --old-fov 90 3.75 0.25 5.35555502528 0.357037001686`

So if you want to preserve the exact mouse feeling you should set

`sensitivity 5.35556`

and`cl_mouseAccel 0.35704`

!