WhiteMagic / JoystickGremlin

A tool for configuring and managing joystick devices.
http://whitemagic.github.io/JoystickGremlin/
GNU General Public License v3.0
313 stars 46 forks source link

vJoy axis response curves do not work with relative axis remaps #400

Open Jahfry opened 2 years ago

Jahfry commented 2 years ago

I'll try to explain, this might be a bit of a mess.

Problem:

Summary: adjusting Response Curve on an axis set to Relative mode blocks input from that axis.

Workaround? Haven't found one yet aside from just getting used to this axis working in the wrong direction as Star Citizen doesn't give an inversion option for mining laser power axis.

Details:

I have a setup (see details below) where if I hold button 3 on my right stick, and twist the right stick, it sends input to vjoy1 as Zrot. Binding that in Star Citizen allows use as a mining throttle. Works.

Setting to Relative mode works perfect.

I then apply a Response Curve to vjoy1 Zrot. Works.

But ... if I use the Response Curve "Invert" toggle ... input is no longer seen in game on that vjoy1 Zrot axis.

Reverting the Invert -or- removing the curve -or- switching vjoy1 Zrot back to "Absolute" (and restarting profile each time) immediately gives input to game.

Doing a manual invert (dragging control points with mouse instead of using Invert button) doesn't change the story.

With further testing, any Response Curve aside from the default & uninverted setting causes Relative vjoy1 Zrot values to stop being seen in SC. Even just a small lowering of the default uninverted curve.

Issue happens with Cubic Spline as well as Bezier when inverted.

Extra Note:

Setup:

Hardware/OS/Software:

VKB Setup

Vjoy

Joystick Gremlin

Jahfry commented 2 years ago

XML of current config attached here, state is with Response Curve on vjoy1 Zrot being inverted and therefor not giving input. Simply reverting the curve to default would then allow the input to work.

Star Citizen 3.16.1 VKB dual SCG v003 - curve issue.xml.zip

Jahfry commented 2 years ago

Possibly related to #363 ?

WhiteMagic commented 2 years ago

What are you seeing in Gremlin's input viewer when adding response curves to a relative axis? In my quick tests, adding the response curve behaves as expected.

As for the scaling values, the code updates the axis value at 100Hz with a step size of input * (scale / 1000), so it will take 10s to go from centre to full deflection when the stick is fully deflected.

Jahfry commented 2 years ago

I just did some screenshots showing no input vs relative vs relative+inverted.

Summary: input viewer shows the input but in-game when inverted I'm not seeing a change (let me refine that, I do see it jitter between the 50% default state and 49% then back to 50%).

Shots below:

Note: in the above 3rd example, if the invert had worked, the game screen would have shown mining throttle at 100% (not the 0%) from the inversion. No amount of twisting and holding either direction would budge it from 49-50% (50% solid if scale 1.00 instead of 5.00).

Additional notes:

Until that last note I was leaning towards this maybe being a problem in the game itself, not Gremlin. But with that last note above it really seems to be something in Gremlin going strange on the vjoy curve (since it works as a physical stick curve).

I can handle using that as a workaround, it's no easier/harder to apply the curve in that location.

Attaching an updated XML to show what did work (contrasted with the earlier .ZIP that did not work)

Star Citizen 3.16.1 VKB dual SCG v005 - workaround.zip

WhiteMagic commented 2 years ago

Just to clarify the response curve is on the vJoy device and not on the physical device? If yes then this might be the actual issue as I haven't tried this. Response curves on vJoy axes directly behave slightly different from the normal ones added to physical inputs.

Jahfry commented 2 years ago

I've tested both. Summary of results:

1) Response Curve, inverted, on vJoy device = no input

2) Response Curve, inverted, on physical VKB devies = works as expected

WhiteMagic commented 2 years ago

Yeah, something is off with how response curves that aren't doing anything affect the relative input.