How To Achieve The Most Accurate Mouse

NerdIIINerdIII Join Date: 2003-04-05 Member: 15230Members
<div class="IPBDescription">with some maths...</div> This morning I decided to find out about the theory for a program idea I have had in mind for some weeks. It is the problem with the mouse jumping over pixels in HL from time to time. If you want the 100% accurate mouse you'll have to follow these two steps:

1. Make sure your mouse speed setting in Windows is accurate. *Usually* this is speed setting 10, but this can differ between drivers. So you should check twice if your mous already jumps over pixels in Windows. (Use small resolutions and try to get a background pattern that makes the exact mouse position more visible. If the mouse is too fast it will always jump over the same pixels on your screen. So if you think you saw i jump just move it back again.)
The mouse speed can be changed in the control panel with the mouse tool. Setting 'cursor speed' to the fith setting from the left is the same as setting '10' in the registry.
If you prefer the registry for some reason: The value is HKEY_CURRENT_USER\Control Panel\Mouse\MouseSensitivity

2. Now that the mouse is accurate you need to set the speed in Half-Life so the crosshair doesn't jump over pixels. There are three values (for console or config files):
<u>sensitivity</u> - Sets the overall mouse sensitivity. Setting this too low can result in slow movements beeing overseen by the engine. This effect becomes worse the more you zoom in (sniper rifles). I have set it to 10 for easier calculation.
<u>m_yaw</u> - Sets the horizontal mouse speed
<u>m_pitch</u> - Sets the vetical mouse speed
The exact mouse speed is 'sensitivity' * 'm_yaw/pitch'. If this product is 90 the view will turn 180° from one mouse tick.
The uber special formula I invented uses a few extra variables I will explain now:
<u>scale</u> - How many pixels should the mouse move every tick. Set this to one unless you have a high resolution and want to try two-pixel-movements or higher.
<u>PixelX</u> - Your horizontal screen resoulution. If you are unsure look it up in your video settings.
<u>FOV_X</u> - This is the most complicated part. You need to know the field of view of your mod. In HLDM this is 90°, so from the left end to the right end of your screen you can see 90° of your sourroundings. I think it is the same for NS and other mods.
Now the formula. Remember the result is the product of sensitivity and m_yaw/pitch. So if you have sensitivity set to 10 you must set m_yaw/pitch to one tenth of the result.

sensitivity * m_yaw/pitch = ArcTan(2 * scale / PixelX) * Tan(FOV_X / 2) / 2°

m_yaw and m_pitch should be the same unless you like it when the mouse is slower up/down than left/right or vice versa.
For my resolution (1024x768) I have set sensitivity to 10 and m_yaw/pitch to 0.00559528

(P.S.: Can someone verify that the FOV is 90° in NS?)

Comments

  • CForresterCForrester P0rk(h0p Join Date: 2002-10-05 Member: 1439Members, Constellation
    <!--QuoteBegin--NerdIII+Sep 30 2003, 04:58 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (NerdIII @ Sep 30 2003, 04:58 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> (P.S.: Can someone verify that the FOV is 90° in NS?) <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    It varies. Marines have 90*, I think. Skulks have something like 120* and Onos has probably around 70*. These are just guesses, but I know for sure that FOV is different for them.
Sign In or Register to comment.