Mouse Movement

[WIP]

Outside Minecraft, mouse movement is represented by the instant displacement in pixels: (dx,dy).

In-game, mouse movement is represented by the instant rotation of the camera in degrees : ($\Delta x, \Delta y$ ).

Sensitivity
Sensitivity (s) is a setting that allows the Player to change how fast the camera should turn.

This setting can be changed in the Controls tab of the Options menu.


 * The default sensitivity is "100%" ($s=0.5$ )


 * The lowest vanilla sensitivity is "0%" ($s=0.0$ )
 * The highest vanilla sensitivity is "200%" ($s=2.0$ )

In 1.8, $\Delta x$ is calculated as:

$$\Delta x = 1.2dx \times (0.6s + 0.2)^{3}$$

$\Delta y$ is obtained in the same way, and is multiplied by -1 if "Invert Mouse" is ON.

With default sensitivity ($s=0.5$ ), one pixel of mouse movement translates into 0.15° of rotation.

This means that the camera moves in increments of 0.15°: to turn 45°, you would need to move your mouse by 300px.

In reality, s is a float, which means it can take any value (even negative).

You can change the value of mouseSensitivity in the options.txt file (found in the .minecraft folder)

Remarkable values
Since it's possible to set the sensitivity to any value we want, it might be interesting to adjust the sensitivity to match specific rotation increments.

To get the required sensitivity for the desired increment $\delta$, you simply need to reverse the previous formula:

$$s = \frac{\sqrt[3]{\frac{\delta}{1.2}} - 0.2}{0.6}$$

Yaw
...