Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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,865
    Control Mapper does not enforce an assignment count limit per Action. The Conflict Checking API doesn't care about how many elements are currently assigned to an Action. The developer is free to assign as many elements as they want to an Action as well as the user.
     
  2. TimHeijden2

    TimHeijden2

    Joined:
    Aug 11, 2016
    Posts:
    21
    That makes sense technically, though I think it's confusing to the user. This because the UI shows a set amount of fields that can be configured, which as you stated isn't actually the case.

    Thanks for the info regardless! I was confused as to why it would the way it does. As mentioned in the original comment, we found a way to avoid the behavior in our specific case.
     
  3. mmanno

    mmanno

    Joined:
    Nov 18, 2014
    Posts:
    4
    I found and resolved the issue, thank you for your help and patience.
     
  4. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    400
    I'm getting this error, any idea what causes it? Found a little bit of documentation on your website about it but I am using the correct versions of unity and .net so that shouldn't be the issue according to the docs.

    I did update to a newer version of Rewired, but then reverted back and since then this issue has showed up. Not sure.


    Code (CSharp):
    1. [ERROR] Rewired: Rewired: An exception occurred during initialization. Input will not function.
    2.  
    3. Message: Could not load type 'Rewired.Interfaces.INativePlatformHelper' from assembly 'Rewired_Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    4.  
    5. Stack Trace:   at sGOzFSGjKHdfKNMblgSfqldibpA.NjxBIQiLVZhdjBbBwkMOpumMrAf (System.String , System.Collections.Generic.List`1 , Rewired.Data.ConfigVars ) [0x00000] in <filename unknown>:0
    6.   at Rewired.InputManager_Base.InitializePlatform (Rewired.Data.ConfigVars configVars) [0x00000] in <filename unknown>:0
    7.   at Rewired.ReInput.uMPzjjoeQKYgmkOQweOUayqaqmn (System.Func`2 ) [0x00000] in <filename unknown>:0
    8.   at Rewired.ReInput.NjxBIQiLVZhdjBbBwkMOpumMrAf (Rewired.InputManager_Base , System.Func`2 , Rewired.Data.ConfigVars , Rewired.Data.ControllerDataFiles , Rewired.Data.UserData , Rewired.Data.UserDataStore ) [0x00000] in <filename unknown>:0
    9. ------- Rewired System Info -------
    10. Unity version: 2017.4.5f1
    11. Rewired version: 1.0.0.111.U5
    12. Platform: Windows
    13. Using Unity input: False
     
  5. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Do a clean re-install:
    http://guavaman.com/projects/rewired/docs/Troubleshooting.html#clean-reinstall

    >> Rewired version: 1.0.0.111.U5

    1. This is an extremely old version of Rewired.
    2. You are using the Unity 5 branch of Rewired in Unity 2017. This is not supported.
     
    DMeville likes this.
  6. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    1,216
    How do I get input from an Xbox One controller button running in the Unity Editor at runtime? I vaguely recall having this issue a few years ago but can't remember how to resolve it.

    player.GetButton(actionId) works if the button Action is assigned to a key on a Keyboard Map. player.GetAxis works for axis (left/right stick, triggers etc) on the controller.

    However, when I create an button action and assign it to say the B or X buttons (Element) within the Xbox One Controller Joystick Map, player.GetButton(actionId) always returns false. I'm sure I'm missing something obvious but can't figure it out.
     
  7. Bonfi_96

    Bonfi_96

    Joined:
    Oct 2, 2013
    Posts:
    32
    Hi!
    I'm experiencing a weird bug (maybe?) in situations where one button is being mapped to two different actions.
    On a machine the double mappings work and show up in the controller/mouse maps, on another machine they don't show up. Here is two screens to compare the mouse maps of the two cases. As you can see some mappings go missing for some reason.

    A

    B

    I managed to test on 3 machines with 3 different controllers with dual mappings both on mouse and controller:
    A: Dualshock 2 - mouse and controller work
    B: Xbox One Pro Controller (using xinput) - mouse and controller work both ignore and remove double mappings
    C: Xbox 360 Controller (using xinput) - mouse and controller work

    A was using a local working copy , B and C bot got theirs from git so I think the cause does not lie there as one works and the other doesn't.
    I absolutely have no idea what can be wrong as it's not only a controller issue but it affects the mouse too.

    Maybe you have some lead to follow to solve this? Thanks!
     
  8. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Most likely this:
    http://guavaman.com/projects/rewire....html#windows-xbox-one-controller-doesnt-work

    Otherwise:
    http://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information
     
  9. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Rewired will never delete your mappings that are defined in the Rewired Input Manager. The only explanation for this is the Rewired Input Manager data is not the same on the system where the mappings are removed. Version control is a likely culprit. The only other possibilities I know of:

    1. Check the Rewired Input Manager. If it is a prefab, the instance in the scene must be sync'd to the on-disk prefab or your will get different results than you expect if you're editing the prefab and the instance is out of sync. Standard prefab handling methods apply. http://guavaman.com/projects/rewired/docs/InputManager.html

    2. Loaded XML/JSON data is overwriting your mappings:
    http://guavaman.com/projects/rewired/docs/UserDataStore.html#clearing-playerprefs
     
    Bonfi_96 likes this.
  10. Bonfi_96

    Bonfi_96

    Joined:
    Oct 2, 2013
    Posts:
    32
    Thanks a lot for the lead, the problem was indeed #2 Btw, the asset is awesome!
     
  11. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    1,216
  12. Rumbleboxer

    Rumbleboxer

    Joined:
    Dec 26, 2012
    Posts:
    27
    Hi guys, interested in getting your plugin. Just want to confirm, it's possible to have people playing with a keyboard AND controller at the same time? And even multiple different inputs at the same time, eg. keyboard, controller, joystick, guitar?
     
  13. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,455
    Yes, to keyboard and controllers working at the same time. I do not know how a guitar works since I do not have a guitar controller to test with. Flight Controllers, game pads and keyboard and mouse all work nicely together. See the full list of supported controllers at this URL.

    http://guavaman.com/projects/rewired/docs/SupportedControllers.html

    The best way for you to test to make sure Rewired works as you expect is to download the free trial version. Then you know exactly what you are getting. You can find the free trial here:

    http://guavaman.com/projects/rewired/trial.html
     
    guavaman likes this.
  14. sunrisebacon

    sunrisebacon

    Joined:
    Jul 15, 2017
    Posts:
    11
    I'm currently evaluating the trial version of Rewired and I think I found a bug.
    I'm posting it here as I didn't find any other way to report it.

    I'm using input events method for listening to events and when I use this method
    http://guavaman.com/projects/rewire...ml/M_Rewired_Player_AddInputEventDelegate.htm
    the callback is constantly called for all configured actions even if no user input is present.

    Using any of the other overloads works just fine and the callback is only triggered on user input.

    Rewired version: 1.1.21.3.U2018
     
  15. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    This is not a bug. The overload you are using specifies no Action or input event type, therefore it is called every time the specified Update loop runs when input is updated.
     
  16. sunrisebacon

    sunrisebacon

    Joined:
    Jul 15, 2017
    Posts:
    11
    I see.
    That seems a bit strange to me. Wouldn't I always want some user input?
    In what scenario would that method be useful?
     
  17. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    It's effectively an alternate way of polling for input with a callback instead of using the Update/FixedUpdate/OnGUI MonoBehaviour callbacks.
     
  18. Jmbryan10

    Jmbryan10

    Joined:
    Apr 24, 2015
    Posts:
    6
    Hello,

    I'm trying to implement dual touch joysticks (left thumb for movement, right thumb for aiming). It seems Rewired doesn't support this multi-touch functionality as both joysticks are responding to all touches all the time. Would it be possible to add an option to the TouchJoystick control to respond to only a single pointer/touch ID at a time? i.e. capture the pointer/touch ID during OnPointerDown and ignore any subsequent events for other IDs.

    Or if you would be willing to open-source just the touch controls that would be awesome as well!
     
  19. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    It already does this. It captures the id of the first touch to activate the control and that touch is the only touch allowed to interact with it until it is released.

    How joysticks respond to touch depends on how you've set their inspector properties up and if you're using Touch Regions on them. If you've enabled "Activate on Swipe In" on the right-side joystick, start a touch on the left-side joystick, then move that finger (still touching) over to the right-side joystick, the right-side joystick will respond to that touch. Touch controls do not communicate with each other. You can't prevent one touch control from responding to a touch that another control has already captured, but you can set things up to better handle things like this. Disable "Activate on Swipe In" so the joystick can only be activated when an initial touch happens over its area. "Stay Active on Swipe Out" is another important one. Disable this on both joysticks and you can leave "Activate on Swipe In" enabled to achieve a similar result.

    See the included examples. Touch Controls 1 shows using a Touch Region and a Touch Joystick on the left half of the screen and a Touch Pad on the right side for look control. The same could easily be done with two Touch Joysticks.
     
    Last edited: Jan 8, 2019
  20. Jmbryan10

    Jmbryan10

    Joined:
    Apr 24, 2015
    Posts:
    6
    Thanks for you're reply. That is essentially what I tried, I modified the TouchControls1 example to use a 2nd touch joystick to control the rotation instead of the touch pad. However, if I start moving the cube using the left joystick (left hand) and then try to simultaneously rotate the cube using the right joystick (right hand) then it applies that 2nd touch to left joystick instead, even if I touch directly on the right joystick. The cube moves in the direction of my 2nd press and doesn't begin rotating. Both joysticks are configured with a Touch Region that covers their respective half the screen and "Activate on Swipe In" is disabled on both.

    Disabling "Stay Active on Swipe Out" also doesn't help. In either case, this wouldn't be a feasible solution as this option is essential for both joysticks.

    Note that I'm testing this using Unity Remote if that matters at all.
     
    Last edited: Jan 9, 2019
  21. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Then this is probably a Unity Remote problem then because it works 100% perfectly testing on Android. I'm going to have to investigate to see why code that works on Android and iOS doesn't work when using Unity Remote.

    Not if you're using Touch Regions.
     
  22. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Edit: It is indeed Unity Remote causing the issue.
     
  23. Jmbryan10

    Jmbryan10

    Joined:
    Apr 24, 2015
    Posts:
    6
    I can confirm as well, you're example does not work for me using Unity 2018.3 with Unity Remote on iOS. I will try deploying to an iOS device.
     
  24. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    It will work in a build. The issue boils down to UnityEngine.Input.touchSupported returning false when using the Unity remote. This is throwing everything off in both the touch controls and in the RewiredStandaloneInputModule. Input.touchSupported cannot be used to determine if touch input is actually supported. Therefore it's using mouse input when using the remote, hence the no multi-touch.
     
  25. Jmbryan10

    Jmbryan10

    Joined:
    Apr 24, 2015
    Posts:
    6
    I see, that's a shame given that this is one of the ideal use-cases for Unity Remote. Thanks for your quick support!
     
  26. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    89
    Hi, is there anyway to enable and disable player input?
     
  27. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    I will remove all references to Input.touchSupported and it will work. It will no longer be able to detect what platforms can and can't support touch input though.
     
  28. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    No. There is no way to disable a Player's input apart from disabling all its Controller Maps or unassigning all Controllers. You should flow control your input in your scripts instead of just constantly getting input from all Players at all times and turning input off in the input system.
     
  29. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    12
    Been using rewired for a month or so now, and it is a very good setup.
    I have a few bugs though from my testing. At least i think they are bugs.

    I am using it in conjunction with the TPC by Opsive.
    Character ID 0 will always be the keyboard, so to have all characters use a single controller each means no character with ID 0.
    Second one and most annoying one, is that no matter the config, all characters seem to move with the keyboard, even though they move individually with their respective controllers. Except character ID 0 if used. Still same issue with keyboard, but just no controller attached.

    Is there a way to say who can use what, or in the extreme case "share" a keyboard with two players?
     
  30. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Neither of these are bugs in Rewired.

    1) There is nothing in Rewired that requires Player 0 to be the keyboard. You have complete control over which Player(s) use the keyboard and what keys each Player maps to Actions. All of this can be set up in the Rewired Editor.

    2) This sounds simply like a configuration problem. Every Player that is allowed to use the Keyboard must be 1) assigned the Keyboard 2) have Controller Maps that bind keys on the keyboard to Actions for that Player. Again, all of this can be set up in the Rewired Editor.

    All runtime Rewired objects can be viewed live using the Debug Information tool:
    http://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information

    If you are using the TPC integration provided by Opsive and are just using the default settings, there could be issues there. Look at how it's set up, see what's assigned to the different Players, and determine what's happening and how to change your configuration to make it work.
     
  31. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    12

    Thanks for the quick reply. I did find how to stop everyone from reacting to the keyboard. Thanks for the help there.

    But still have issues with "ID 0" character.
    Mouse only works on ID 0 , and a controller will not load in ID 0 .
    Not good if you want to have a game use both as an option which is the norm for single player games.
    Any insight to what it might be?
     
  32. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    The only way a controller would not be assigned to Player 0 is if you have "Exclude Joy Auto Assign" checked in the Player page or have set Player.controllers.excludeFromControllerAutoAssignment to true in a script, assuming you're using Joystick Auto-Assignment. If a controller is being assigned to the Player but input isn't working, it's a Controller Map issue. See this to go through step by step to figure out why Joystick input isn't working.

    Mouse only working on Player 0 would also mean the same thing (but the inverse) as the keyboard issue. You 1) don't have the mouse assigned to the other Players and/or 2) you don't have Mouse Maps set to be loaded in the other Players.

    You have to understand the fundamentals of how Rewired works with regards to Players, Controllers, and Controller Maps to be able to set up input properly. The documentation is the best place to start. Please read the sections under the heading Concepts here. Then go through the Quick Start to see an example of every step required to set up input in a Player.
     
  33. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    12
    Still lots to look at, but aside from my earlier mistake, i think i have it correct.
    In Rewired Editor, "assign on start" seems to do nothing.
    Maps have been enabled/disabled as needed for testing.
    Auto assign on/off tested as well.
    Tried increasing "max controllers per character" with same/no affect.
    I setup 4 players in editor.... I only have 3 setup in game as i only have 3 controllers to play with currently.
    So i change the game character ID's to test linking to rewired.

    Somehow mouse is locked to only working on ID0 and joysticks are only mapping from ID1 , as well as each one is staying locked to their respectful ID's. Even if "reassign to previous owner" is not set.
     
  34. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,455
    What version of TPC are you using?
     
  35. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    12
    TPC is latest version 2.0.7
    Only third person version if that matters any. (though should not)
    It has some basic scripts to connect the two systems together supplied by Opsive

    It might be some conflict with the two, but that is why i am here first to rule out one thing first.
     
  36. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    85
    I'm working with the PressAnyButtonToJoin scene. Is it possible to assign the keyboard to a player in the same manner as the joysticks? In this scene the keyboard always controls Player 1

    Example: if a button on Joystick 1 is pressed, I want to use that joystick to control Player 1. If a button on the keyboard is pressed, I want to use the keyboard to control Player 2.
     
  37. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Use Debug Information to view what's happening at runtime.

    Joystick problem:
    1. Open Players -> Player0 -> Controllers -> Joysticks. Is anything listed here?
    2. If yes, open Players -> Player0 -> Controller Maps -> Joysticks -> THE JOYSTICK. Is anything listed here?
    3. Open Players -> Player0 -> Controllers. What is the value of Exclude From Controller Auto Assignment?

    Mouse problem:
    1. Open Players -> Player1/2/3 -> Controllers. What does "hasMouse" say?
    2. If yes, open Players -> Player0 -> Controller Maps -> Mouse Maps. Is anything listed here?

    Are you using UserDataStore_PlayerPrefs or Control Mapper in this project? Do you see a log entry in the editor saying saved XML data is being loaded? See this: http://guavaman.com/projects/rewired/docs/UserDataStore.html#clearing-playerprefs Controller assignments by default are saved when using UserDataStore_PlayerPrefs/Control Mapper. Clear PlayerPrefs.
     
  38. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    The Keyboard is a Controller as a single unit. The Keyboard has to be assigned to every Player that wants to use it. What determines which keys each Player bind to Actions are the Controller Maps you've assigned to each Player. You must manage what Controller Maps each Player has loaded to determine which keys each Player is allowed to use.

    Relevant topics:
    http://guavaman.com/projects/rewired/docs/Controllers.html#keyboard
    http://guavaman.com/projects/rewired/docs/ControllerMaps.html#keyboard-maps
    http://guavaman.com/projects/rewired/docs/HowTos.html#managing-controller-maps-runtime
    http://guavaman.com/projects/rewired/docs/HowTos.html#loading-controller-maps-runtime
    http://guavaman.com/projects/rewired/docs/HowTos.html#enabling-disabling-controller-maps
     
    reinfeldx likes this.
  39. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    12
    Well after looking for and finding the Debug info while running, i was able to see what was connected and to where.
    Firstly, all mouse and joystick allocations were fine.
    I am using the "UserDataStore_PlayerPrefs" .
    Mouse is still buggy.
    But after all the back and forth, i have found a possible cause.

    I have a 3D SpaceNavigator.
    It was not plugged in at first. But the drivers were installed.
    I noticed that it was showing up on the assigned controllers while debug was on.
    Well rather the "3Dconnection KMJ Emulator" was.
    So i dug out my SpaceNavigator and plugged it in. Now it is taking up two slots .....
    One as "KMJ Emulator" and other as "SpaceNavigator". Also one is sharing a system ID for some reason.

    Is there a way to NOT use a controller. Black list it or something?
    And in a real compiled game, will it get stuck on a given controller and need to be flushed for swapping a controller?
     
  40. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Both assignments and Controller Maps?

    This saves controller assignments by default. Any change you make to assignments and bindings in the Rewired Input Manager will not be reflected at runtime unless you clear PlayerPrefs.

    This would only explain the joystick assignment issue as your Player 0 was likely being assigned the 3Dconnection KMJ Emulator device as its Joystick. It wouldn't explain the mouse issue.

    Check the values of the Actions the mouse Controller Map binds in each Player:
    Debug Information -> Players -> Player# -> Actions -> ActionName

    Click back in the game window before moving the mouse around and pressing buttons or it won't update anything in the inspector.

    No. There is no blacklisting of controllers in Rewired. Even if there were, there's no way you could possibly cover every device (real or virtual) that exists or may exist out there in the future. This is why it's critical you provide your users a way to assign and map controllers (something like Control Mapper). The user will be able to see what controllers are assigned to their Players and make adjustments accordingly. Users can and frequently do have input tools installed on their machines like VJoy, DS4Win, etc. These can frequently make dead virtual devices even when the controller they're installed to support is not present on the system. Rewired cannot tell a real device from a virtual device. There are also sometimes weird keyboards and custom devices that may show up as multiple devices because of the way their HID descriptor is set up. So having a way for users to manually change controller assignments is not optional.
     
    Last edited: Jan 9, 2019
  41. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    12
    Yes Both assignments and Controller Maps were correctly allocated.
    Mouse for now is not a big issue, but will look at it again later down the line. Hopefully i will have found the problem by then.

    I can see your point about controllers. So i will go the rout you suggested regarding a Control Mapper implementation.

    Thank you for your help.... and for the great asset "ReWired".
     
  42. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    If the Actions bound on the Mouse Maps for the Players are returning values in Debug Information when you interact with the mouse yet the in-game players are not responding, I'd suspect something in the TPC integration. If, on the other hand, Actions are not returning values, there has to be either a mouse assignment or mouse map issue. Make sure the mouse maps and the individual bindings on them show they're enabled in Debug Information. If a Controller Map or an Action Element Map (binding) is disabled, it won't return any value.
     
  43. bcjordan

    bcjordan

    Joined:
    Sep 23, 2013
    Posts:
    29
  44. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Keyboard mappings are in the Action Element Map:
    http://guavaman.com/projects/rewire..._Rewired_ActionElementMap_keyboardKeyCode.htm
    http://guavaman.com/projects/rewire...l/P_Rewired_ActionElementMap_modifierKey1.htm
    http://guavaman.com/projects/rewire...l/P_Rewired_ActionElementMap_modifierKey2.htm
    http://guavaman.com/projects/rewire...l/P_Rewired_ActionElementMap_modifierKey3.htm

    KeyboardKeyCode enumeration:
    http://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_KeyboardKeyCode.htm

    Or use Unity's KeyCode:
    http://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_ActionElementMap_keyCode.htm
    https://docs.unity3d.com/ScriptReference/KeyCode.html

    Mouse element identifiers are fixed and based on Unity's mouse:
    0, // "Mouse Horizontal",
    1, //"Mouse Vertical",
    2, //"Mouse Wheel",
    3, //"Mouse Left Button",
    4, //"Mouse Right Button",
    5, //"Mouse Button 3",
    6, //"Mouse Button 4",
    7, //"Mouse Button 5",
    8, //"Mouse Button 6",
    9, //"Mouse Button 7"
     
  45. bcjordan

    bcjordan

    Joined:
    Sep 23, 2013
    Posts:
    29
    Thanks for the info! When I call player.controllers.maps.GetFirstElementMapWithAction with a keyboard controller object it doesn't seem to find the map with the action (when the player has overridden it in their config, at least).

    Is there a different method to call to retrieve the keyboard/mouse maps?
     
  46. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    No. There is no reason that method would not work. Verify a Keyboard Map actually exists in the Player that binds the Action in question using Debug Information: http://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information

    If you are skipping disabled maps in the function call, verify the Keyboard Map and the Action Element Map are both enabled.

    If you have multiple Action Element Maps that map that Action, this function will only return the first. What is it returning?
     
    Last edited: Jan 12, 2019
  47. OldLegWig

    OldLegWig

    Joined:
    Mar 18, 2018
    Posts:
    81
    I'm surprised I can't find info related to this, but I have an Xbox One S controller connected to my MacBook via bluetooth and Rewired does not seem to detect it at all. Does anyone know the solution to this? Thanks!
     
  48. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    Xbox One S should be recognized and work. If it's not, something has probably changed in a new firmware, a driver you have on your system, or something else.

    1. Are you using the Native Primary Input Source under Settings -> OSX?
    2. Open Debug Information -> Controllers -> Joysticks. Does the joystick appear there?
    3. If so, does it say "Is Recognized: True"?
    4. If "Is Recognized" is False, open the Rewired/DevTools/JoystickElementIdentifier scene and press Play.
    5. If there are multiple controllers detected, press +/- on the keyboard to select the Xbox One S controller.
    6. Send me a screenshot.
     
  49. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    351
    Hello Rewired Sensa :)

    I was wondering, using the many PlayMaker Actions you gave us, is there a way to clear out all the INPUTS. I am having a problem where after a round of playing the character gets reposition and goes back to idle, but sometimes I guess the Walk forward input gets stuck so they keep walking.

    I need a way to make sure that at the end of a match all of the INPUTS get cleared out, if that makes any sense ? TY for all your help and the awesome product you created. I shall wait for your words of wisdom.
     
  50. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,865
    You can't clear inputs in Rewired. You can disable input on a Controller level or a Player level (Controller Maps). But it sounds to me like your problem lies elsewhere. Find out what exactly is getting stuck. It's very unlikely to be at the hardware or Rewired level. You can view the live output of Rewired Controllers (low-level) and Actions (high-level) in the Debug Information tool to confirm that this input is or isn't getting stuck somewhere before Rewired gives you the value. If the Action value is not getting stuck on but you're still seeing your characters continue walking, you'll know the problem is in your code/FSM.
     
    XCO likes this.