andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
528 stars 49 forks source link

Improve gyro filter #319

Open sndein opened 3 months ago

sndein commented 3 months ago

This replaces the code for filtering of gyro samples. Instead of lerping with a previous sample, which can potentially feel laggy if only a little, it essentially applies a negative acceleration below the threshold as outlined by the gyro guru @JibbSmart here. This also makes the threshold act on the gyro vector's magnitude rather than each axis separately leading to a "round" threshold rather than a "square" one to put it in deadzone terms.

In a small effort to have some unification between different Quake games that implement this I also changed the default and max slider values to track the ones used in YQ2.