Announcement

Collapse
No announcement yet.

Issue - Virtual Controller does not Zero when No Input - [Broken?]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue - Virtual Controller does not Zero when No Input - [Broken?]

    Issue - Virtual Controller does not Zero when No Input

    Trying to Accomplish: Auto-Run macro using WASD (keyboard) in virtual controller, with bindings that utilize multi-key combinations.

    What I expected: Smooth, natural control by binding one physical key to two virtual controller outputs. The controller should simultaneously hold RB/R1 while also holding the Left Joystick in a given direction (WASD).

    What happened instead: My idea worked! Almost. The virtual controller is able to simultaneously trigger a button and joystick direction. However, the joystick does not reset when there is no input. As a result, the character keeps walking or running in a random direction without any input.



    Here is a video demonstrating the issue.


    I've also attached my configuration below for FF7 Remake!

    ----

    Hello reWASD!

    I hope my summary above summarizes the issue! Additionally, I have proposed a solution at the end of this prompt. I hope it's worth considering, and thanks!


    ---


    It is my hope that this sufficiently demonstrates an issue I am having with mapping my keyboard + mouse into a virtual controller. Initially, I began by simply mapping keyboard inputs and mouse inputs into the virtual controller and tested my settings in FF7R.

    As I later realized how to set things up, I decided to try making a macro that lets Cloud auto-run without needing to click or hold an additional button. This is done by creating a Key Combo, underneath either the Keyboard or Mouse bindings interface.

    This is where I discovered an issue. While attempting to control the character, he would start walking automatically without any input. I am familiar with this type of issue using traditional, physical controllers that calibrate incorrectly when plugged into a console. But this made no sense!

    After testing various settings, I found my edge case causing the issue. I do not know why.

    It appears that when mapping my WASD keys to the L Joystick (of the virtual controller) using the Key Combo feature, that pressing any diagonal direction (W+A, A+S, S+D, D+W) results in garbage values being left behind inside the virtual controller.

    Nothing I know of within the current version of the software fixes this. I've looked extensively, I have tested my settings extensively, and I seem to have spent the better part of an afternoon and evening debugging this issue without any resolution. As far as I know, this topic has not been specifically brought up in the forums, but it is related to at least two other posts made in January and March of 2021 by other users.

    For reference and control, moving horizontally or vertically does not cause an issue - though when moving Left on the X axis, the value goes slightly below -1 which I assume might simply be a float rounding error. This does not seem to be an issue on the Y axis, but I would naturally assume the math for both axes are the same.

    The mappings used in Key Combo are to set the relative axis to 100% in their respective directions; positive to the Right and Upwards, and negative to the Left and Downwards. The setting used is Relative.

    The reason for not using Absolute is so that my given input matches the flow of the game and does not abruptly change direction, resulting in a very smooth and enjoyable experience, which is also similar in effect to the game's inbuilt keyboard bindings (using WASD).

    As a result, the WASD keys behave very closely to an actual controller joystick.

    Possible Solution

    I do have a proposed solution to this, so feel free to forward this portion to your development team. It would seem as though raw input on a given axis exists within a box, between normalized values of 0 and 1 (mathematically between -1 and 1). I propose changing the aspect of how joystick axes are calculated and instead use 2D or 3D unit vectors, which are normalized to have a length not greater than 1.

    As for the math, relative values should be added together, per axis, for each binding, then normalized to create a directional vector. If an Absolute value is given for an axis, then it overrides any Relative inputs being added together with the value given as an absolute. In terms of priority, the last given absolute is dominant. Each axis is considered independently for this first step, with normalization next based on the total length of the vector.

    If there are no inputs to the controller joystick, the length of the vector should be set to zero, else normalize the given vector using the pythagorean theorem (optionally multiplied by a scalar value) and return.

    Naturally, all values will scale proportionally with the given direction, and the vector magnitude establishes how far the joystick is pushed.

    I sincerely hope this is useful to someone, or at the very least might catch the attention of the reWASD team!

    Thank you for your time!
    Attached Files

  • #2
    Hello!

    Thank you for the provided details.

    This issue happens from time to time when you deflect a stick in Relative mode in different directions — a kind of overflow which leads to the stuck stick. We are aware of this one and will try to fix it in one of the upcoming versions. Please stay tuned for the updates.

    I have a few more things to say though:
    • If you could consider using Absolute mode, it should be a great temporary solution — this issue doesn't happen with this one
    • You have mentioned that you are using a combo that deflects the left stick + presses a bumper and a trigger, but I haven't found such combos in your config. I assume you have removed them for testing purposes, but if I wasn't attentive enough, please let me know

    Comment


    • #3
      Originally Posted by reWASDer View Post
      • If you could consider using Absolute mode, it should be a great temporary solution — this issue doesn't happen with this one
      • You have mentioned that you are using a combo that deflects the left stick + presses a bumper and a trigger, but I haven't found such combos in your config. I assume you have removed them for testing purposes, but if I wasn't attentive enough, please let me know
      Yes! I'm sorry, I actually did remove them for testing. I wanted to make sure it wasn't happening because of a double input, and I actually remembered this after I uploaded my configuration! I remade it for you! - Like the Remake game I'm testing on!

      I've additionally separated the configurations into three groups:
      • Main - My original keybindings, which work fine. However there is no way to map both directional input and the button to run.
        ​​​​​​​
      • Debug - My test environment, which are set the way I want them. However this is what's causing the issue aforementioned.
        ​​​​​​​
      • Development - Based on your suggestions, I created this branch which uses Absolute values instead of Relative. This however isn't comfortable to use imho.


      Attached Files

      Comment


      • #4
        Got it, thank you for the details and checking things for me!

        I hope we will be able to fix the issue with the relative deflections in one of the upcoming versions, but at the moment, I can't guarantee any exact ETA. Will keep you posted!

        Comment

        Working...
        X