fivem icon indicating copy to clipboard operation
fivem copied to clipboard

tweak(natives/five): curve Xbox controller's vibration intensity

Open thorium-cfx opened this issue 3 years ago • 3 comments

  • Adds a curve like interpolation to Xbox controller's vibrations intensity.
  • Adds n-dimensional quadratic- and cubic Bézier interpolation to project.
  • Cleaned up the non-Bézier math calculations and added some caching.

resolves #828

thorium-cfx avatar Apr 14 '22 18:04 thorium-cfx

Did you check if this behaves as one would expect with these tuning values, or do you not have an Xbox controller at hand to check?

blattersturm avatar Apr 15 '22 10:04 blattersturm

Did you check if this behaves as one would expect with these tuning values, or do you not have an Xbox controller at hand to check?

Uhm no I don't have an Xbox controller at hand, better if someone with one adjusts these values. Though I tried it with a PS5 controller by setting vibration.LeftMotor/RightMotor as well (I can also try Switch, Steam, PS3/4 controllers).

For the PS5 controller: the default values (as above and currently applied in game) are pretty harsh to me, the vibration is pretty annoying so to speak, though cranking maxValue up to 100.0 or higher and bezierBias set to 0.0 makes it way better. I can push these changes if you want vibration.LeftMotor/RightMotor to be set as well.

This image can help to adjust the bias with the values (x is input, y is output, not to be mistaken by the 2D versions), from lowest to highest: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5. If we want more control then we would need to apply the cubic version (a tad heavier). image

thorium-cfx avatar Apr 15 '22 12:04 thorium-cfx

^ Some more caching

thorium-cfx avatar Apr 15 '22 12:04 thorium-cfx

Any update on this?

spacevx avatar May 15 '23 16:05 spacevx