Closed Nettakrim closed 2 months ago
1.3.0-alpha.3 adds logarithmic zoom adjustment, and scaled mouse movements, damage tilt, and view bobbing.
I would like to add 3.
in a future update.
Thanks for the suggestions!
1.3.0-alpha.7 will contain zoom yaw adjustments :)
1: currently the FOV difference in each scroll is constant
fov = c^zoom
, where c is zoom sensitivity2: pitch and yaw have linear changes with mouse movements
delta *= c^zoom
3: a change in yaw has less effect at extreme pitches
yaw_delta /= cos(pitch)
, however this causes a division by 0 when looking directly up or down (which is expected if you think about it - its impossible to get lateral movment from yaw at this point, you can only change roll)max(cos(pitch), 0.1)
these are the 3 things i did in my mod Spyglass Astronomy that make the spyglass zoom nice to use, the first 2 are common in lots of zoom mods, im yet to see another which does the yaw correction
the code for changing mouse sensitivity is prone to being incompatible with some mods, however, since a lot of more popular zoom mods use redirects, or duplicate the entire vanilla behaviour with their adjustments, instead of modifying variables