1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Split axis in inputmap?

Discussion in 'General Discussion' started by Doyle524, Jan 30, 2014.

  1. Doyle524

    Doyle524
    Expand Collapse

    Joined:
    Dec 4, 2013
    Messages:
    52
    I have a Logitech F310 and would like to split the left analog stick's y-axis (recognized as "thumbly" in-game) so that the positive half (0,1) controls acceleration and the negative half (-1,0) controls the brakes. Is this possible in BeamNG yet? If so, how, and if not, do you plan on adding this feature at some time? Thanks!

    Sent from my SPH-L710 using Tapatalk
     
  2. Ltp0wer

    Ltp0wer
    Expand Collapse

    Joined:
    Apr 14, 2013
    Messages:
    162
  3. Doyle524

    Doyle524
    Expand Collapse

    Joined:
    Dec 4, 2013
    Messages:
    52
    Thank you for the reply. Unfortunately, the thread you linked to does not answer my question. I have all functions of the controller working perfectly if I use the triggers for gas/brake, but I would like to use one axis (thumbly) for both acceleration (on the positive half of the axis) and brakes (on the negative half). Does anybody know how to "split" an axis in an inputmap? Thanks.

    Also, I do appreciate the advice to search for an answer. I did search with a few different keyword combinations, but I found nothing pertaining to my question, and thus I made a thread about it.

    Sent from my SPH-L710 using Tapatalk
     
  4. Ltp0wer

    Ltp0wer
    Expand Collapse

    Joined:
    Apr 14, 2013
    Messages:
    162
    Alright man, I did some digging.

    Found this thread which helped me out a bit.

    Add:
    Code:
    %mm.bind(%device, thumbly, "D", $gp_deadzone, stick_accelerate_direct);
    to your controller's inputmap (located in BeamNG-DRIVE-0.3\scripts\client\inputmaps).

    Then, to beamng.cs (located in BeamNG-DRIVE-0.3\scripts\client), add:
    Code:
    function stick_accelerate_direct( %val ) {   vlua("input.event(\'axisy0\', " @ %val @ ", 2)");
       vlua("input.event(\'axisy1\', " @ -%val @ ", 2)");
    }
    Playing around with this a bit, it's a little wacky. It's taking me a little practice to do full lock and full gas at the same time.

    edit:
    Also, if any programming gurus know how to accomplish this by only changing the inputmap and not adding a new function to beamng.cs, please let me know.
     
  5. Doyle524

    Doyle524
    Expand Collapse

    Joined:
    Dec 4, 2013
    Messages:
    52
    This worked for me, thanks a bunch!

    Sent from my SPH-L710 using Tapatalk
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice