Search Unity

Rewired - Advanced Input for Unity

Discussion in 'Assets and Asset Store' started by guavaman, Sep 25, 2014.

  1. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    No there isn't. Light color has to be set when the output report is initially sent to detect support for and activate the special features on the controller. I cannot access those features or even detect that the controller supports those features until I send an output report, and light color must be part of that output report. I cannot get the light color from the controller, only set it.
     
    Last edited: Jun 17, 2016
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Rewired does not support the Steam Controller natively for many reasons. I spent over two weeks exploring the possibility of adding Steam Controller input support and ran into a plethora of issues that simply make it impossible to have the Steam Controller transparently used natively along with Rewired. In short, Steam fulfils a huge amount of
    the functionality of Rewired and trying to make Steam's system work inside Rewired's design is simply redundant. Trying to make it fit is the classic square peg round hole problem trying to wrangle Steam's action-based system into some kind of input source for Rewired's action-based system. In addition, configuration importers, exporters, and editor tools would be required along with a slew of Rewired -> Steam -> Rewired mappings of various kinds. The process would be cumbersome for the developer and generally confusing process that would require a detailed tutorial to teach developers how to use it. In addition, the users would be required to use two completely different systems to map and calibrate normal controllers and the Steam Controller, one within the game and the other in Steam's UI.

    Another big issue -- you pretty much cannot support XInput along with Steam Controller native support. If XInput is enabled, you have no way of differentiating any XInput device from the Steam Controller. To XInput, the controller is simply one of 4 possible controllers attached. The Steam Controller still emulates the XInput device when accessing the Steam Controller natively, so you have no way of knowing which XInput devices are just actually the Steam Controller and what devices are other XInput devices. Disabling XInput means you lose universal support for all XInput devices, each instead will have to be identified by VID/PID/Product Name for recognition and mapping, you introduce the problem that the L/R triggers cannot be pressed down simultaneously without cancelling each other out, you lose vibration support, and you completely lose support for Steam Link and Steam Streaming.
     
    Last edited: Jun 17, 2016
  3. DMinsky

    DMinsky

    Joined:
    May 20, 2012
    Posts:
    23
    Wow! Thanks for so fast and detailed answer!

    At the moment I use some kind of 4th variant. Also, your words about how to use Rewired and how not is really important for me and I think for lot of other developers. Thanks again for clarifying!
     
    guavaman likes this.
  4. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,449
    I am very tempted to get the Sony DS4 controller with Rewired extended support for gyro information. That could be very useful

    @guavaman has definitely done an excellent job with the Rewired asset.
     
  5. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    489
    I'm profiling my game to try and find where I am having performance issues, and I frequently see a ReInput.LotsOfRandomLetters(), which is in InputManager_Base.FixedUpdate(), that is taking anywhere from 5-20ms on a deep profile. It's one of the slowest items in the profiler. Any thoughts on how I can resolve this?
     
    Last edited: Jun 19, 2016
  6. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    No there isn't because there is no performance issue except when using Deep Profile. Deep Profile is notoriously inaccurate when dealing with deep levels of nested method calls because it uses reflection to get method names and such. Profile your game with Deep Profile disabled and you will see a massive increase in speed.

    For tips on squeezing out additional performance:
    How To's - Optimizing performance
     
    Last edited: Jun 19, 2016
  7. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Rewired 1.0.0.89 is available for registered users to download now. If you would like to register to receive early access to updates, please contact me here. The update should be available on the Unity Asset Store in 5-10 business days.

    1.0.0.89:

    Changes:
    - When loading Controller Maps from saved XML data, ActionElementMaps are now validated to ensure the Action Id referenced still exists and is discarded if not.
    - Added Axis Data Format to HardwareJoystickMap
    - Updated controller definitions for changes in Fire OS 5. Fire OS versions prior to 5 are no longer supported.

    Changed Controller Definitions:
    - Added Amazon Fire TV mapping to Nyko Playpad definition
    - Removed Amazon Fire TV definition for the following controllers due to changes to Fire OS 5. The default Android definition will now be used for these controllers on Fire OS.
    - 8Bitdo NES30 (joystick mode)
    - 8Bitdo NES30 (gamepad mode)
    - 8Bitdo SNES30 (joystick mode)
    - 8Bitdo SNES30 (gamepad mode)
    - GameStick Controller
    - MadCatz C.T.R.L.R
    - MadCatz Micro C.T.R.L.R
    - Moga Hero Power
    - Moga Pro Power
    - Red Samurai Wireless Gamepad
    - Samsung EI-GP20
    - SteelSeries Free
    - SteelSeries Stratus XL (HID)

    Bug Fixes:
    - Windows Standalone: Fixed very rare issue where left mouse button could get stuck in an on state until clicked again when switching from the desktop back to the application using the task bar when Native Mouse Handling option is enabled.
     
    Last edited: Jun 20, 2016
    Acissathar likes this.
  8. MatiasJP

    MatiasJP

    Joined:
    Nov 4, 2013
    Posts:
    16
    Hi guavaman,

    There is any way to map an action with one joystick button/axis as modifier with another joystick button/axis to do that action?

    Example:

    right analog move the camera, but L1 + right analog horizontal, rotate de camera, and L1 + right analog vertical controls the zoom of that camera.
     
  9. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    474
    Your example should be pretty easy to code. Just check if the L1 mapped action is pressed, and if so, apply any right analog axis outputs as necessary.
     
  10. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    No there is no multi-element binding except for keyboard + modifier keys. This is detailed in the documentation here:

    How To's - Handling multi-button Actions
     
  11. MatiasJP

    MatiasJP

    Joined:
    Nov 4, 2013
    Posts:
    16
    Oh I'didnt see that sorry to bother, also there is anyway to change modifier or add a modifier buttons through the control mapper demo?

    Thanks in advance.
     
  12. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Control Mapper handles keyboard modifier assignment. Just hold the modifier(s) first, then press the primary key when rebinding.

    CM.jpg
     
  13. MatiasJP

    MatiasJP

    Joined:
    Nov 4, 2013
    Posts:
    16
    I feel a fool, i test that 5 minutes ago, and didn't work, I test that now, and works like a charm... was probably doing something wrong.

    I worked on an input system a year ago, when rewired didn't have as many features as it has now. I today need to implement a controller for a new game and let me tell you input system is one of the most well documented, well coded, and more maliable asset that I see in the asset store. Also the new input system prototype of unity is mileeeees away from rewired.

    Thanks again for the help.
     
    guavaman likes this.
  14. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    I'm glad it works!

    Thanks you for the compliments! :) I've tried and continue to try to make it as useful, complete, and usable as I can so game devs can focus their energies on making games, not trying to get input to work. There are, of course, about a billion things I would like to add to make it even better.
     
  15. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    403
    Hey, could I get a method overload for AddInputEventDelegate with a void callback please?

    like AddInputEventDelegate(voidCallback, updateLoop, eventType, actionID);
     
  16. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Why would you need this? There would be no way to get data from the event that way. And if you don't want the data from the event, what is the reason this would be any better than the Action<InputActionEventData> version that currently exists? A tiny optimization because it wouldn't be creating a struct?
     
  17. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    403
    yea i guess its a pretty tiny optimization
    with eventType and actionID i have all the data i need from button events
     
  18. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    I see. I'd really rather not add an overload just to save 1 struct instantiation per event.
     
    AVOlight likes this.
  19. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
  20. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,449
  21. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    It's awesome!
     
  22. MatiasJP

    MatiasJP

    Joined:
    Nov 4, 2013
    Posts:
    16
    Hi guavaman,

    Just a quick question, there is some way to access the SDL2 api? how do you access it?
     
  23. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Not through Rewired. Rewired does not expose the API's of the native input sources it uses.

    You would access it directly from the native SLD2 DLL which has to be in the Plugins folder for Rewired to access it.
     
    MatiasJP likes this.
  24. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    406
    Hi Guavaman, sorry to keep bothering you but I'm having more DS4 weirdness!
    I just updated Rewired to the latest version (hoping to fix the previous problem and enable enhanced device support again), but now Rewired just refuses to work with my controller at all. If it's connected to the PC, either with a USB cable or over bluetooth, I get this error when running my game:

    Nothing I do now seems to fix this and (stupidly) I didn't backup before updating so I can't rollback now. Does that error give you any clues?

    Thanks!
     
  25. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    @Rtyper Did you follow these directions on Updating Rewired?

    From the linked document:

    Issues when Updating

    If you experience issues when updating, you may find it easier just to delete the Rewired folder and reimport it. Rewired stores no data in its folder so you are safe to just delete it and reinstall it in any situation where problems occur. However, during this delete and reinstall process, be sure you DO NOT save your scene until after importing Rewired again and verifying the Rewired Input Manager works as expected.

    ---------------------

    The only possibility of getting an error in that method is if the serialized data in ControllerDataFiles is corrupted or missing, specifically the list of controller definitions. Neglecting to move Rewired back into the root asset folder and then upgrading will always cause catastrophic failure because Unity will unpack all the same assets over again and assign them new GUIDs because their GUIDs are already in use by the files in the moved Rewired folder. You will end up with two copies of everything and the GUIDs won't match what Rewired expects.
     
    Last edited: Jun 23, 2016
  26. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    406
    I wasn't following that guide, but I had created a new scene first, deleted the Rewired folder then updated from the Asset Store. I get the exact same error even when creating a new Rewired Input Manager in an empty scene as well.
     
  27. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Are there any remnants of Rewired's installation in other folders anywhere in your project? If so, delete them.

    This should not be happening and I can think of no reason it would happen. Installing from the Asset Store, it should not be possible for serialized data to be corrupt unless there's some kind of Unity bug I'm not aware of. It certainly doesn't happen to me. This has never happened before to any customer that I'm aware.

    1. Look at the Rewired Input Manager's inspector and click on the ControllerDataFiles field. Does the Project window highlight the ControllerDataFiles object in Rewired/Internal/Data/Controllers?
    2. Click on that ControllerDataFiles in the Project window and look at the inspector. Are there any empty fields? It should list "Unknown" in the first field Default Hardware Joystick Map. Then it should list all the joysticks under Hardware Joystick Maps. Then it should list the template files under Joystick Templates. There should be no blank fields.
    Try this:
    Delete Rewired again, quit the editor without saving, then reinstall Rewired from the Asset Store. Make sure the Console is set to display all messages, errors, and warnings. Note any warnings you see and post them here.
     
    Last edited: Jun 23, 2016
  28. Athalos

    Athalos

    Joined:
    Jul 21, 2014
    Posts:
    23
    <RI.Hid> Failed to create device file:
    2 The system cannot find the file specified.

    Trying to get XBox One Controller working - keyboard mapping is good... Xbox controller was working with standard input previously .... any thoughts?
     
  29. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    This error is not from Rewired. That's from Unity. There's a thread on it here. It does not affect Rewired in any way.

    There's documentation to help you figure out why your joystick control doesn't work:
    Troubleshooting - Joystick control doesn't work
    Troubleshooting - My controller doesn't work

    These topics will take you through every common joystick setup mistake and give you debug code to use to see exactly what is happening with controller assignments and mapping.

    I'm guessing that you are just starting with Rewired. Joystick failure, especially common controllers like the Xbox 360 controller, is almost always due to mapping and/or configuration errors. Please review the Quick Start and make sure you have not skipped any steps.
     
    Last edited: Jun 23, 2016
  30. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    @Athalos

    In addition, from Troubleshooting - Windows: XBox One controller doesn't work

    Most often this is caused by creating a Joystick Map specifically for the Xbox One controller when Use XInput is enabled instead of using the Dual Analog Gamepad Template. See Controller Maps - Special Considerations for XInput gamepads on Windows Standalone, Windows App Store, and Windows 10 Universal.


    Controller Maps - Special Considerations for XInput gamepads on Windows Standalone, Windows App Store, and Windows 10 Universal

    On Windows Standalone builds and in the Windows Unity Editor, when Use XInput is enabled, and always on Windows App Store and Windows 10 Universal builds, Rewired uses XInput for all XInput-compatible controllers instead of the chosen primary input source. This has some implications on creating Joystick Maps:

    When using XInput, Rewired has no way of determining the actual controller type because this information is not available through XInput. The only information Rewired has to identify the controller is that it is XInput-compatible. Therefore, all XInput devices are treated as "XBox 360 Controller". This means, with Use XInput enabled, if you plug in a XBox One Controller, Rewired cannot identify that it's an XBox One Controller and load the Joystick Maps you created specifically for the XBox One Controller. Instead, it identifies it simply as an "XInput Gamepad" and loads the Joystick Maps from the XBox 360 Controller maps you've created. This is an inherent limitation in XInput.

    But because Rewired has the Dual Analog Gamepad Template that is compatible with these controllers, it's easiest to just create a Dual Analog Gamepad Joystick Map instead and it will work for any XInput device when Use XInput is enabled. This way, you don't have to worry about making separate maps for XBox 360 Controller, XBox One Controller, etc. and everything will just work. This also works cross-platform.
     
    Last edited: Jun 23, 2016
  31. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    406
    Just followed these steps (and I'd previously done almost the same thing, only deleting the library folder too after closing Unity to force everything to re-import) and still no joy. There's no errors/warnings on import, only this that was there (about 60 times) immediately after re-opening the editor before importing:
    It's not giving a stack trace or anything though, so I have no idea what exactly was looking for the missing Rewired dll.
    Weirdly the ControllerDataFiles asset is totally empty as well, even on after re-importing. I also tried manually restoring all the data to this file, and although it got rid of the error, the controller still wouldn't work.
     
  32. Athalos

    Athalos

    Joined:
    Jul 21, 2014
    Posts:
    23
    Ahh yes, found the link in the documentation for troubleshooting - it is very good, the whole document by the way! My first impulse is usually to post on the treads as the documentation for assets are usually lacking, but I stand corrected here sir - great documentation and great asset! THANKS!
     
    guavaman likes this.
  33. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    110
    I'm getting an error on launch that says "The Action "55495375626d6974" does not exist." I also have three more errors with similarly long strings. I suspect this is related to my UI Actions (horizontal, vertical, submit, cancel), because those stopped working at around the same time.

    I double-checked, and my actions are still assigned correctly in the Rewired editor. I even deleted one of the old ones and created a duplicate with the same name.

    I don't know where those numerical action names came from, but I can say that this came up shortly after updating to Unity 5.3.5. The update crashes sometimes, and it may have messed up some of my settings. But if my actions are named correctly, where's Rewired getting those long numerical strings from?
     
  34. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Is the project small enough for you to upload to something like Dropbox so I can see it and figure out what's going on? It doesn't sound to me like this is Rewired causing the problem. Something is clearly wrong with Unity if ControllerDataFiles data is empty, that is proof some kind of serialized data loss is happening. That data should be extracted from the Unitypackage the Asset Store extracts when you install from the Asset Store. There's no other process going on here and none of this is handled by Rewired.

    Install Rewired in a new project and see what happens.

    Another thing that could cause the data to disappear in ControllerDataFiles is if you have two copies of Rewired somewhere in your project. The two conflicting Rewired_Core.dll's would confuse the system and it wouldn't be able to load the HardwareJoystickMap class properly and the references in the ControllerDataFiles may be left blank. I suggest you do a search on the project folder for "rewired" and make sure something didn't get moved somewhere accidentally.
     
    Last edited: Jun 23, 2016
  35. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Rewired does not do anything special with strings. It does not encode them in any way, so I have no idea where that string is coming from.

    Rewired will only log that message about missing Actions in 3 cases:
    1. You try to get an Action from ReInput.mapping.GetAction using that string.
    2. You try to get input from the Player using that string.
    3. You load some invalid saved XML data into a controller that maps an Action that no longer exists. (Are you using Control Mapper? Are you using UserDataStore_PlayerPrefs?) This was modified in 1.0.0.89 to simply discard these invalid XML mappings when loaded. Edit: Actually this would not cause that message because the XML save data saves the integer Action Id, not the string name.

    Check all your code and make sure you're not doing the above.

    Rewired works perfectly well with Unity 5.3.5f1.

    Right click on the inspector tab and choose Debug. Look at your object with the RewiredStandaloneInputModule and look at what data is saved into the Action name fields.
     
    Last edited: Jun 23, 2016
  36. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    @Rtyper

    Do you happen to have Asset Serialization Mode set to "Force Binary" in the editor settings?

    UnityEditorSettings.jpg

    There is indeed a major bug in Unity.

    I just tried importing Rewired about 10 times from the Unity Asset Store in Unity 5.3.5f1 and TWICE I was able to make it import with corrupted data. ControllerDataFiles was empty.

    Both times I did it, I had just switched to "Force Binary" in the editor settings. The first import after that both times was corrupted. A second import immediately afterwards on top of the old import was not corrupted.

    I can guarantee you, if ControllerDataFiles is getting corrupted, other Rewired serialized data is also getting corrupted. This would explain why it still doesn't work when you fix ControllerDataFiles manually. All of the HardwareJoystickMap files may be corrupted. Try importing Rewired several times in a row and check the ControllerDataFiles inspector to see if it's corrupting or not.

    I remember seeing mention of this kind of corruption on the Unity Asset Store newsgroup more than a year ago. I had never seen it and none of my customers ever reported it, so I didn't think anything of it. Apparently, this major bug is still around and can affect any Unitypackage imported into Unity.

    Edit: Confirmed. Every time you import the asset from the Unity Asset Store or a separate Unitypackage file it will corrupt the serialized data if the Asset Serialization Mode is set to "Force Binary" as long as the Rewired folder doesn't exist previously. I have yet to have it fail when Asset Serialization Mode is set to "Mixed" or "Force Text."

    I have sent a bug report and a repro case to Unity.
     
    Last edited: Jun 23, 2016
    Rtyper likes this.
  37. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    110
    Ah, there we go. Forgot about the input module. I think the Unity crash changed those strings somehow, but it's fixed now. Thanks!
     
  38. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    That's worrying. There could be a lot more corrupted data in your project. If you backed it up before upgrading Unity, I would suggest you restore the backup and let it upgrade your project again.

    This kind of thing is why I always use "Force Text" on Asset Serialization Mode. It's much easier to recover from corruption because you can open and edit the files. I also always enable visible meta files for similar reasons.
     
  39. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    406
    Yes! This is it - though oddly it doesn't seem like anything else in Rewired was corrupted, as I was able to import it into a test project and copy and paste the Controllers folder (along with meta files) into my original project and get everything (apparently) working. Possibly some other issues that I haven't run into though, so I'll make sure to fix it properly!

    Thanks so much for your help on this - I've suspected for a while that Unity's serialization system could use some serious work. I've actually run into @_eternal 's problem before, having strings storing emotion names in my LipSync plugin get replaced with hex codes like that (thought at the time they were possibly GUIDs or something, but I could never reproduce the problem). Don't know if maybe that could be related to the serialization mode issue?
     
  40. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Good, I'm glad it works. I really, really don't like mysterious, unexplainable failures. One more thing to add to the Known Issues page I guess.

    I didn't know upgrading Unity could lead to data corruption, but I guess it makes sense because it does reimport all the assets after an upgrade. One more reason to always backup your projects before upgrading anything.
     
    Last edited: Jun 23, 2016
  41. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    63
    Is there support for the Thrustmaster TX racing wheel? A player recently emailed me:

    Unfortunately I don't seem to get any response with the wheel. The only input that's recognized is when the game starts. To get passed the "Press any button" I can press buttons on the wheel and I'll get into the main menu. After that, nothing. I can't navigate the menus with the direction pad and none of hte buttons work as a back or select. I can still navigate and play with the keyboard.

    I unplugged all my other input devices (Xbox controller, and TH8A shifter).


    I'm using the latest Rewired version on Unity 5.3.5 and have setup the "Racing Wheel template" to work with a Logitech G27, but there don't seem to be any visual templates to use like the Xbox Controller here:
    http://guavaman.com/projects/rewired/docs/ControllerMaps.html

    Rewired is great by the way, it's way better than the Unity input system!
     
  42. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    The list of controllers with extended support is here. If you don't see in the list, it can't be automatically mapped.

    No, the Thrustmaster TX racing wheel is not a recognized controller and therefore cannot work with Racing Wheel Template. As stated on the above page:

    All Other Controllers
    Any controller which does not have a hardware definition will be mappable through user mapping or by mapping actions to numbered axes and buttons in the Unknown Controller map.

    From the Controller Maps page:

    Unknown Controllers:

    For unrecognized controllers (controllers not listed here), Rewired will use the Unknown Controller map (whether you define a map for this or not). This is a generic map that is just a sequential list of axes and buttons, each corresponding to an axis and button on the controller in the order they are defined by the controller hardware. You can create a map for Unknown Controller if you like, but there's no way for you to know which axis or button corresponds to which element on the controller the user plugs in, so it's generally better just to leave it without a map and provide the user with a remapping screen where they can set up their unknown controllers how they see fit. See Creating a Controller Mapping Screen for more information.

    Note that even though a controller is unknown to Rewired, XML mapping data can still be saved and loaded for these controllers. This means that if your users make custom control mappings for unrecognized controllers, they can still save their configurations and continue off with the same controller layouts after quitting and restarting the game. All saving and loading of controller data is up to the developer to implement. See Saving and Loading Controller Maps for more information.

    ----------------

    If you haven't provided your users with a way to map their controls (like Control Mapper), then no controllers except those listed on the Supported Controllers page will work. If you have provided them with a way to map their controls, then virtually any controller will work after the user maps it.

    There is no visual guide because 1) the names are so straightforward 2) there is no universally recognized layout for a racing wheel as there is for the gamepad (Xbox 360)

    • Wheel, Accelerator
    • Brake
    • Clutch
    • Shift Up
    • Shift Down
    • Wheel Button 1-10
    • Console Button 1-10
    • Shifter 1-10
    • Select
    • Start
    • System Button
    • Horn
    • D-Pad

    All templates except the gamepad template are very generalized. There is no specific universal layout of racing wheel that can be used to represent what the elements correspond to graphically.

    It's obvious what the Wheel, Accelerator, Brake, Clutch, Shift Up, and Shift Down are -- those can't possibly be misunderstood and would be the only things possible to label in some kind of graphical guide. Wheel Button 1-10 is just that -- a list of buttons on the wheel in no guaranteed order because there is no universal layout to go by. Same for Console Button 1-10 -- pretty much any button that's not on the wheel itself. Shifter 1-10 are the gear shifter positions if there is a gear shifter. Select, Start, Horn, and D-Pad are also obvious, but also not guaranteed to exist just like almost every other element. System Button is the PS button on a PS3/PS4 compatible racing wheel, or other 3rd button in the Select/Start set like the Guide button on the X360 controller.

    Thanks!
     
    Last edited: Jun 25, 2016
    Little_Gorilla likes this.
  43. MatiasJP

    MatiasJP

    Joined:
    Nov 4, 2013
    Posts:
    16
    Hi guavaman! I'm currently implementing rewired into a AAA game and they work with scaleform, all the UI is in AS3, so I cant use the control mapper.

    Is possible to rebind a key with only the "actionId" and the controllerPollingInfo?
     
  44. GamesDeveloper12

    GamesDeveloper12

    Joined:
    Nov 7, 2013
    Posts:
    18
    Hi,

    I am trying to get my steering wheel to give me values between 0 and 1 for the three pedals, 1 when the pedal is fully pressed and 0 when not pressed at all. However it gives me the opposite (1 when up and 0 when down) and i cant seem to get them to work how i want. Any advice ?
     
  45. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    Please give me more information.
    • What steering wheel/pedals are you using?
    • What platform are you using?
    • What is your chosen input source?
    • What version of Rewired are you using?
    • What version of Unity are you using?
    If it is a recognized controller, it will already be calibrated to invert the pedal values. If it is not, it must be inverted by the user through calibrating the controller with something like Control Mapper. Calibration can invert the value and it can also transform the value by setting the min, max, and zero values.

    How To's - Calibrating joystick axes
     
    Last edited: Jun 25, 2016
  46. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    I'm not entirely clear on what you're asking. ControllerPollingInfo is returned by the polling methods and gives you the controller and element information about the element the user activated during listening. You use that resulting information to create or modify an ActionElementMap in a ControllerMap to make an Action -> Element binding.

    The source code was provided to both the Control Remapping 1 example and Control Mapper so you could read that source code and learn how control remapping is to be handled. That is the documentation for controller remapping. They both show you how to use polling to listen for input, how to use ControllerPollingInfo to create an ActionElementMap, how to use conflict checking so you don't overwrite other assignments.
     
    Last edited: Jun 25, 2016
  47. astroblastro

    astroblastro

    Joined:
    Feb 26, 2013
    Posts:
    5
    Hello,

    first off... great software...

    but i'm having an issue... Unity UI buttons are responding to button down pushes from rewired when I would prefer for them to respond to button up. How do I change this?
     
  48. astroblastro

    astroblastro

    Joined:
    Feb 26, 2013
    Posts:
    5
    well... I just went into the RewiredStandaloneInputModule and changed it to "button up". This will probably work... I just need to invalidate the button up on item it gets released on


    Side note, this software is awesome I think your community would appreciate a rewired specific forum of some sort.
     
  49. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,833
    RewiredStandaloneInputModule works the same was as Unity's StandaloneInputModule. Unity's module uses GetButtonDown, so Rewired's also uses GetButtonDown. The only way to change this is to change the source code as you have done.

    Thanks! I don't really think a dedicated forum would get much if any traffic. Pretty much the only thing people ever post to this thread is support requests. Usually they don't post anything more after 1-2 support requests.

    I much prefer support to be handled via email on the support form on my website because I can gather much needed information from the user via the form that is rarely ever volunteered in forum support requests. In addition, I post links on the form to various parts of the documentation that have the answers to the majority of questions asked and very likely have the answers they are looking for. I can't do that in a forum unfortunately.

    If the motivation is to have a forum of threads on support topics you can search, very little has ever been asked in this thread that I haven't already addressed in the documentation. If it is, I generally add it to the docs if I think more than just that user might be interested in it.
     
  50. astroblastro

    astroblastro

    Joined:
    Feb 26, 2013
    Posts:
    5
    i suppose the only other major issue i ever ran into was trying to make a smash style UI system with tons of player driven cursors using controllers. Ultimately... I ended up just rolling my own system (using rewired) to some reasonably good results. Its a little hacky... but it works well for my simple use case scenario.

    *plug* twitch footage from our producer randy doing a run through last night of our title "BATTLESLOTHS", powered by rewired ;-). You can see the smash style UI here.

    https://www.twitch.tv/randygbk/v/74768096