The script creates a few "user-defined variables" and a "key binding" to set a button run the required commands. sensitivity: 5 (but you probably already changed it, due to such value being quite slow).Just for completeness (our script isn't going to alter these cvars): You can use it to compare the different "feeling".) bind MOUSE3 +zoom ("+zoom" is the standard OA zoom feature, that our script desn't affect.bind MOUSE2 +strafe (in the example, we will use MOUSE2 button for our custom zoom feature, of course you can use the key/button you prefer!).cg_zoomfov: 22.5 (horizontal fov while holding the zoom button: our script isn't going to alter or to use this, but your value of this cvar is probably the zoom level you wish to emulate).cg_fov: 90 (horizontal field of view: 90 gives a "natural" look, but many players set it higher, even to 120 or similar, to see more enemies around them!).Let's recap the default values of the involved variables in OA 0.8.8: This stuff works with both Quake 3 Arena and OpenArena. The use of the formula is not strictly related with our "manual zoom" trick: you may wish to use it just to keep the same mouse feeling after you changed your cg_fov value for any other reason. This is however only possible when switching to a toggle bind so if you prefer to hold your zoom button for zooming there is no solution for you.Īnother small drawback of this workaround is that you may occasionally find yourself starting a new match or respawning after death with zoom already active, if you had it before.Īs zoom feature is managed by "gamecode", even if OA3 may include a simpler workaround for mouse sensitivity during zoom, probably this one will still be the only way to go if you will need it in old mods. If you move away from using +zoom and instead use a toggle bind that changes cg_fov you can then adjust m_yaw and m_pitch to get the optimal feel according to the formula. You could also change cl_mouseaccel and sensitivity by the same factor instead, but it's probably cleaner to adjust m_yaw and m_pitch because then you can freely change sensitivity and cl_mouseaccel and the zoom sensitivity will be updated accordingly ("mouse speed" slider in Control Options modifies sensitivity CVAR). Adjusting m_yaw and m_pitch by a factor will change mouse sensitivity and acceleration by that factor. If you are trying to use the formula on your own: depending from the system you are using to make the calculations, you may or may not need to explicitly convert fov from degrees to radians first, in order to obtain the right results.įor the scaling to work properly it has to affect both mouse sensitivity and acceleration. It doesn't matter if vertical or horizontal fov is used to scale, the result will be the same. So, we are taking advantage of this by manually tweaking m_yaw and m_pitch values using this formula: m_yaw * (tan(zoomfov / 2) / tan(basefov / 2) (and the same with m_pitch in the place m_yaw). It is tan(vertical_zoomfov / 2) / tan(vertical_basefov / 2). A formula that would create more consistent results independently from cg_fov is vertical_zoomfov / vertical_basefov.īut there is another formula that is more correct than scaling the sensitivity linearly. This formula is a bit flawed because it assumes the user is playing on 75 vertical fov. The result gets multiplied to both mouse acceleration and sensitivity. The code that is used to scale zoom sensitivity in Quake 3 and OpenArena is vertical_zoomfov / 75.0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |