WhiteMagic / JoystickGremlin

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

Response Curve on relative vjoy axis #495

Closed Teclizitus closed 1 year ago

Teclizitus commented 1 year ago

When assigning a response curve to an relative vjoy axis and changing the maximum or minimum value, the axis breaks in a weird way. grafik Expected behaviour for the image above would be that the axis is just limited on one end. Instead the axis freaks out an becomes unusable.

WhiteMagic commented 1 year ago

I'll need more details about what you're actually doing, a picture of a response curve alone doesn't help me reproduce what you do. There also is no such thing as a relative vjoy axis, so I'm not sure what this refers to. Your curve would result in maximum negative deflection (-1) resulting in a lower value something like -0.75 or so. What does freaking out mean here, as the vJoy won't accept inputs outside of it's valid value range.

Teclizitus commented 1 year ago

I am remapping an selfcentering axis(in this case from the TWCS Rocker Switch) as an relative vjoy axis(that is atleast what it is called in Joystick Gremlin). grafik When doing that everything works as expected. When it try to lower the value of the maximum deflection the axis it just rapidly increases in value both when applying postive or negative deflection. What i should note is that it seems like applying any changes to the response curve breaks the vjoy axis, just in different ways. When i invert the axis for example it just jumps for a very small amount left and right when depressing the rocker switch. I will make a video to better showcase what i mean.

Teclizitus commented 1 year ago

https://github.com/WhiteMagic/JoystickGremlin/assets/79273471/bf34294c-83c7-473f-93d0-8c06338e8148

Here is the video. On the left normal behaviour, in the middle reduced value at maximum deflection and on the right with an inverted axis. I should add that this problem only occurs with an relative axis - absolute works fine. Also a friend of mine has the exact same problem on an different pc. I hope this helps. Edit: Here a youtube link in case the you cannot view the video on Github. https://youtu.be/itKma-SI6dk

WhiteMagic commented 1 year ago

While I can't really make much out in the videos, it appears that you have a response curve assigned to the vJoy device. This will break the logic of the relative axis remap. The response curve triggers the check of whether the axis has been modified by another source, in which case the relative change is not applied. Applying the axis to the vJoy axis causes this to trigger and thus will stop any relative axis changes from going through. In most cases, this should result in no change being made once a part of an axis is entered where the response curve causes such a change delta to occur.

Nothing you can do about this other than not using a response curve on the vjoy axis.

Teclizitus commented 1 year ago

Oh! Thats a shame. Good to know though. Is there no way then to limit the maximum( (or minimum) value for an relative axis remap in joystick gremlin?

WhiteMagic commented 1 year ago

No there is no way you can forcibly prevent the relative value change to stop if a specified axis value has been reached. To get something like that you'd have to write a plugin and in there replicate some of the relative remap logic.

Teclizitus commented 1 year ago

Alright, thanks for the information. I will try that but i dont think my python skills are up for the task. Im closing this down since there wasnt an bug afterall^^