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.

Computer Mouse Configurations.

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by JayBlazin454, Nov 23, 2016.

  1. JayBlazin454

    JayBlazin454
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    60
    Is there any way to configure the Z-axis of a mouse so that it can progressively control the throttle just like an Xbox controller? There should be some way, because the binding/value for "Change Node Grabbing Strength" goes up and/or down when you manipulate the Z-axis in either direction. I tried to do this with C++, and it applied throttle, but there was no way for me to bring it down even a bit.
     
  2. NoxiousFumes

    NoxiousFumes
    Expand Collapse

    Joined:
    Apr 24, 2016
    Messages:
    674
    You would have to see the scroll wheel to throttle and brake, then set the dead zone to completely cover the brake area of it.
     
  3. JayBlazin454

    JayBlazin454
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    60
    OH. I was thinking set the deadzone so that it no longer covers the "accelerate" area. That way I can control the brakes and throttle separately.
     
  4. NoxiousFumes

    NoxiousFumes
    Expand Collapse

    Joined:
    Apr 24, 2016
    Messages:
    674
    You could also set another binding like the first one, but inverted to make one for the brake.
     
  5. mohkamfer

    mohkamfer
    Expand Collapse

    Joined:
    May 30, 2017
    Messages:
    2
    Sorry for opening this old thread, but OP I wonder how did you even use the mouse scroll wheel in the first place... I tried setting it from the in-game controls section but it after detecting the zaxis it doesn't register it for reasons unknown... I also tried writing the control myself in the .diff file in My Documents and it successfully registered for the action, but has no effect in-game. However, I press CTRL and change the node grab power and it works perfectly fine which leaves me absolutely clueless.

    Also can I know how you implemented it using C++? If that's the final resort of course.

    Note: I'm trying to bind shift up and shift down to the scroll wheel, but really setting any other action to the zaxis has no effect whatsof***ingever

    EDIT: I even added the two options in the gameengine's options file (mouse.json) and still doesn't have any effect...
     
    #5 mohkamfer, May 30, 2017
    Last edited: May 30, 2017
  6. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,021
    In reality the scroll wheel is not an axis, but two buttons. There is currently no generic concept of those 2 buttons being an axis with a lower limit and an upper limit. The priority to implement one is well below dozens of other issues at the moment, so don't count on that being available in the future.

    The nodegrabber has specific code that converts between the button-like input into a 0 to 100% nonlinear scale of forces.
     
  7. mohkamfer

    mohkamfer
    Expand Collapse

    Joined:
    May 30, 2017
    Messages:
    2
    So what did the OP exactly mean by the mouse's Z-Axis? And if the scroll wheels are two buttons as you say, then it should also make sense to be mapped to shiftUp and shiftDown

    I called it zaxis because that's what it's called by the game engine :eek:
     
  8. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    2,021
    Longer explanation: the mouse, from the OS point of view, is just two buttons, which can be either pressed or not. Like two keyboard keys.
    Then there's an abstraction layer, in which a program can find out how many times the buttons were pressed since last time, as a sum.

    The sum could be as low as 1, or a very high number, depending on how each mouse works, how fast it can freely spin when you unlock the scroll wheel, etc. It can be negative for the opposite direction of scroll.

    BeamNG system works with axis where values have the strict range of 0 to 1. So this potentially big number is converted to a value between 0 and 1. Where 0 means it moved down, 1 means it moved up. And 0.5 is the resting position, which you can see in the Options > Hardware menu.

    Each time you touch the scrollwheel, the axis acquires the 0 or 1 value, and then goes back to 0.5 resting position.
     
  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