1. Trouble with the game?
    Try the troubleshooter!

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

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.36 Bug Reporting thread
    Solutions and more information may already be available.

Setting up a Z axis rotation as throttle and brake; logitech dual action ??

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by iheartmods, Aug 6, 2013.

  1. iheartmods

    iheartmods
    Expand Collapse

    Joined:
    Aug 8, 2012
    Messages:
    1,482
    NEED help setting up Logitech Dual Action!

    This input mapping is tricky!

    How can I put Z axis rotation into the input map so that it can be recognized as throttle and brake?

    EDIT

    Here's the code i've written

    Code:
    // Product Name: Logitech Dual Action// GUID: {C216046D-0000-0000-0000-504944564944}
    // axes: 4^V^Z^Y^X
     
    // 0 deadzone
    $gp_deadzone = "-0.15 0.15";
    
    
    // 5% deadzone: 
    // $gp_deadzone = "-0.05 0.05";
    
    
    //moveMap.bind(%device, xaxis, joy_steer);
    moveMap.bind(%device, rzaxis, brake);
    moveMap.bind(%device, rzaxis, "I", accelerate); 
    Steering isn't working but only accelerate is
     
    #1 iheartmods, Aug 6, 2013
    Last edited: Aug 6, 2013
  2. bjytech

    bjytech
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    6
    1. I too tried to get acceleration and brake on the Z roatation but nothing I tried works, also the "I" flag doesn't work in the way you think it would.
    2. Your steering isn't working because its commented out. (thats what the "//" does is comment that line out)
     
  3. Ltp0wer

    Ltp0wer
    Expand Collapse

    Joined:
    Apr 14, 2013
    Messages:
    162
    Re: NEED help setting up Logitech Dual Action!

    You have the rzaxis set to brake and accelerate. You can't do both.

    Think of it like a graph. You have the X axis and the Y axis. If you set x axis to braking, when you move along x, that determines your breaking. If you also set your acceleration to the x axis, except invert the value, when you move along x, it will determine your breaking and at the same time invert the number to determine your acceleration. This obviously doesn't work.


    Edit:

    Disregard above, I had no idea some controllers set both triggers to opposite sides of on axis.
     
    #3 Ltp0wer, Aug 7, 2013
    Last edited: Aug 9, 2013
  4. Fat-Alfie

    Fat-Alfie
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    65
    I think it was Kamil who wrote this code mod, for beamng.cs:

    Add:

    function joy_accelerate( %val) {
    if (%val > 0)
    {accelerate(%val);}
    else
    {brake(-%val);}
    }

    after both the accelerate and brake definitions, then change your inputmap.cs to read:

    moveMap.bind(%device, rzaxis, "I", joy_accelerate);

    You should now be able to use the same axis for both accelerator and brake :)
     
  5. ednevell

    ednevell
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    6
    // Product Name: Logitech Dual Action// GUID: {C216046D-0000-0000-0000-504944564944}
    // axes: 4^V^Z^Y^X

    // 0 deadzone
    $gp_deadzone = "-0.15 0.15";




    // 5% deadzone:
    // $gp_deadzone = "-0.05 0.05";




    //movement
    moveMap.bind(%device, xaxis, joy_steer);
    moveMap.bind(%device, rzaxis, brake);
    function joy_accelerate( %val) {
    if (%val > 0)
    {accelerate(%val);}
    else
    {brake(-%val);}
    }
    moveMap.bind(%device, rzaxis, "I", joy_accelerate);
    function joy_accelerate( %val) {
    if (%val > 0)
    {accelerate(%val);}
    else
    {brake(-%val);}
    }






    This is what you are looking for, you need "//movement" with out quotes for the steering to work. And thanks for the heads up Fat-Alfie
     
  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