Based on a game the is simulated 2.5D, Using the 2018 Unity Engine, and InControl as the Gaming Controller API, where the aiming in-game is a radial circle with linear 1:1 response curve.
// What I am looking for:
I am looking to find out how to add custom aim response curves for the aiming like many games have now-a-days, where some allow you to adjust only axis sensitivity and others let you adjust the response curve.
From what I have found InControl doesn’t have any control post-processing built in currently. And since InControl is giving only a linear, normalized Vector2, I was told I could pass it through an animation curve or any other custom processing function of my own before using the values.
So what would be the math on is?
If the aimer doesn’t follow joystick 1:1, then is it lagging behind?
Animation curves are a good solution. You could prepare different curves, and let the user choose from them. Then just process the 0…1 range inputs you get from InControl through the chosen curves to get 0…1 range values out that are non-linear. The hardest part will be showing the player previews of the curves in the UI. The rest is really straight forward and has nothing to do with lag or smoothing. You’re essentially just changing 1 Vector2 you’re working with already to be a slightly different Vector2.
The whole point of using an animation curve is so you don’t have to do any of the math at all. Just take the linear 0-1 value from your axis and feed it in to AnimationCurve.Evaluate. The function will look-up the corresponding value in the curve.