Search Unity

Rewired - Advanced Input for Unity

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

  1. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    I would like to request iRDS integration if possible. ;)
    Thanks
    G.
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    I was under the impression that you had gotten it working with iRDS.

    iRDS doesn't seem to have an extremely large user base judging from the asset store rating count like PlayMaker, UFPS, and Behavior Desginer do (integration packs I have already included). In addition, I haven't had any other requests for an iRDS integration. This might be a task better suited to the developers of iRDS rather than me adding a support pack to Rewired.

    I currently have a huge number of additions already lined up for Rewired which are going to take months of time that will benefit all users.
     
  3. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Rewired 1.0.0.72 is now live on the Unity Asset Store!

    This update includes native Linux joystick input and a bunch of other additions. See this post for more information.

    1.0.0.72:

    Changes:
    - Changed handling of multiple Rewired Input Managers in a scene. Now when a level is loaded an additional Rewired Input Manager is found, it will just be automatically deleted instead of throwing an error. This is to simplify the process and allow each level to have a Rewired Input Manager prefab instance without requiring an instantiator script.
    - Added tracking of the individual input sources that contribute to the combined value of an Action.

    API Changes:
    - Added Player.GetCurrentInputSources methods
    - Added Player.IsCurrentInputSource methods
    - Added InputActionEventData.GetCurrentInputSources methods
    - Added InputActionEventData.IsCurrentInputSource methods

    Bug Fixes:
    - Fixed incorrect mapping of L1/R2 and L2/R2 on Sony DualShock 4 when using Enhanced Device Support in Windows Standalone.


    1.0.0.71:

    Changes:
    - Added native joystick support for Linux Standalone platform
    - Full intelligent hot-plugging support
    - More than 20 buttons and axes per joystick for advanced controllers and HOTAS setups
    - Vibration for XBox 360 controllers (and other compatible controllers)
    - Tested under Ubuntu 12.04 amd64, Ubuntu 14.04 x86/amd64, Ubuntu 15.04 amd64, and Mint 17.2 amd64
    - Works in Unity 4.x and 5.x
    - Added Android: Support Unknown Gamepads option in Rewired Input Manager settings to allow auto-detection of unknown gamepads on Android. (Limitations apply, see documentation for details.)
    - Added additional Behavior Designer tasks
    - Added icon to Behavior Designer tasks
    - Changed display names of Behavior Designer tasks

    New Controller Definitions:
    - SteelSeries Stratus XL (Windows / Android version)
    - Thrustmaster T300 RS (PS3 mode only)
    - Standardized Gamepad

    New Controller Definitions for Linux Standalone (Native):
    - Microsoft XBox 360 Controller (Includes many generic/clones)
    - Sony DualShock 3
    - Sony DualShock 4
    - Logitech F310 (X and D modes)
    - Logitech F710 (X and D modes)
    - Logitech Dual Action
    - Saitek P880
    - Saitek P990
    - Game Elements GGE909 Recoil
    - Nyko AirFlo EX
    - Radio Shack PC Gaming Controller
    - SteelSeries FREE
    - SteelSeries Stratus XL
    - Moga Hero Power
    - Moga Pro Power
    - GameStick Controller
    - Amazon Fire Game Controller
    - Google Nexus Player Gamepad
    - Nvidia Shield Controller (Wired)
    - PS3 Controller (Gasia Wireless Adapter, includes Trust GXT 39)
    - Red Samurai Wireless Android Gamepad
    - Samsung EI-GP20 Smartphone Game Pad
    - 8Bitdo NES30 (Wired)
    - 8Bitdo NES30 (Bluetooth, Mode 1)
    - 8Bitdo NES30 (Bluetooth, Joy Mode)
    - Nyko Playpad
    - ípega Wireless GAMEPAD Controller
    - ípega Multi-Media Bluetooth Controller
    - idroid:con Snakebyte (Mode 1)
    - idroid:con Snakebyte (Mode 2)
    - GameCube Controller (Mayflash 2-port USB adapter)
    - Saitek X52

    API Changes:
    - Added ReInput.GetFirstJoystickTemplateElementIdentifier method
     
  4. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Just wanted to say thanks again for the Playmaker integration- I've been able to remove some hacks with multiple actions, and instead change behaviours on the fly which has been incredibly useful, and makes the mapping screen simpler!

    I've been working on local splitscreen multiplayer tasks lately, and it really shows how smart the Rewired approach is, just brilliant. Has anyone implemented muliple local players with the UFPS integration- ie splitscreen multiplayer? is there a way to do it, or does UFPS-side input handling fundamentally assume a single player as it appears?
     
  5. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    This is great news. Something cool to work with this next week.
     
    guavaman likes this.
  6. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Excellent!

    UFPS's control scheme is based on a single player, yes. You'd have to implement your own input outside of UFPS's system to achieve this. You'd need to modify the main player controller script and from there just get input directly from Rewired instead of going through UFPS.
     
  7. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi, giving this a go now. Works nicely! In vp_FPInput.cs, I've added:

    public class vp_FPInput : vp_Component
    {

    // Rewired Player
    public int playerId = 0;


    And then for the applicable inputs, I've gone back to:

    protected virtual void InputMove()
    {


    FPPlayer.InputMoveVector.Set(new Vector2(Rewired.ReInput.players.GetPlayer( playerId ).GetAxis("Horizontal"), Rewired.ReInput.players.GetPlayer( playerId ).GetAxis("Vertical")));

    }

    or

    protected virtual void InputRun()
    {

    if (Rewired.ReInput.players.GetPlayer( playerId ).GetButton("Run"))
    FPPlayer.Run.TryStart();
    else
    FPPlayer.Run.TryStop();

    }
     
    Last edited: Oct 18, 2015
    guavaman likes this.
  8. Emre_U

    Emre_U

    Joined:
    Jan 27, 2015
    Posts:
    49
    Hi Guavaman,

    I couldn't find a double tab solution for axis in Rewired (though I loved the ready to go double tab for buttons :) ) But unfortunately GetDoublePressDown and GetDoublePressHold didn't worked for my axis (Horizontal). So I have hacked a (probably disgusting) solution. It is working :p You may check if you want and please point me if there is a better solution in Rewired.

    http://pastebin.com/H0gXzm1f

    PS : I saw the GetAxisRawTimeActive etc. but couldn't figure them out to use with double tab.
     
  9. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    This works for all axes and buttons:

    Code (csharp):
    1. void Update() {
    2.     Player p = ReInput.players.GetPlayer(0);
    3.    
    4.     // Double press down
    5.     if(p.GetButtonDoublePressDown("Move Horizontal")) {
    6.         Debug.Log("Move Horizontal + Double Press Down: " + Time.time);
    7.     } else if(p.GetNegativeButtonDoublePressDown("Move Horizontal")) {
    8.         Debug.Log("Move Horizontal - Double Press Down: " + Time.time);
    9.     }
    10.  
    11.     // Double press and hold
    12.     if(p.GetButtonDoublePressHold("Move Horizontal")) {
    13.         Debug.Log("Move Horizontal + Double Press Hold: " + Time.time);
    14.     } else if(p.GetNegativeButtonDoublePressHold("Move Horizontal")) {
    15.         Debug.Log("Move Horizontal - Double Press Hold: " + Time.time);
    16.     }
    17. }
    For joystick axes, your Input Behavior Button Dead Zone setting will determine when a "button" is activated by an axis.
     
  10. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi,

    I've been trying to shoehorn the logic from RewiredUFPSInputHelper for the framerate independent mouselook directly into the vp_FPInput component, without much luck. Would this be possible, and if so, would you have any pointers or advice?

    Cheers!
     
    Last edited: Oct 19, 2015
  11. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Not really. It's very simple. It consists of 6 lines of code and 2 of those are just closing parenthesis:

    Code (csharp):
    1. // Scale joystick values for Look axes so they stay constant regardless of frame rate.
    2. // This negates UFPS's look axis processing that expects a mouse delta instead of -1.0f to 1.0f joystick axis value.
    3. if(m_fixJoystickLookSensitivity && (axis == lookActionXName || axis == lookActionYName)) {
    4.   Controller controller = player.controllers.GetLastActiveController(); // determine the last controller type used by the player
    5.   if(controller != null && (controller.type == ControllerType.Joystick || controller.type == ControllerType.Custom)) { // joystick or custom controller axis
    6.     value *= (m_fixJLSUseSmoothDeltaTime ? Time.smoothDeltaTime : Time.deltaTime) * m_fixJLSTargetFPS; // scale value to negate UFPS's processing in vp_FPInput.cs that expects a mouse delta
    7.   }
    8. }
    This only even matters if you're using UFPS's mouse processing for your look axes for joysticks.

    You could now use the new functions here to make it more accurate vs GetLastActiveController.
     
    Last edited: Oct 19, 2015
  12. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    I have a 90% finished game ready for steam release that is using Rewired and just saw the new UI 4.6+ Controller Mapping Menu.

    What is the best route to upgrade to the new version without losing the data and many many mapping setups I already have? Im currently using 1.0.0.54.U5 on Unity 5.1.2f1

    Thanks for the AMAZING product. Unity should have included this years ago.
     
    Last edited: Oct 19, 2015
  13. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Thanks!

    The documentation page on Updating Rewired is what you want:
    http://guavaman.com/projects/rewired/docs/Updating.html

    You will not lose any of your mapping data unless you've modified the HardwareJoystickMap files in the Internal folder. All user data in Rewired is saved in your Rewired Input Manager(s) prefab/scene game object.
     
  14. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    I did the whole thing today in less than 30 minutes.... The new menu and integration were flawless and very easy.

    Thanks again for the fantastic input controller. :)
     
    guavaman likes this.
  15. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    What type of game will you be releasing?
     
  16. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    I purchased your asset a while back, and I was wondering if I'd be able to run two instances of unity with two different controllers without getting interference from each game instance.
     
  17. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Not necessarily. It depends on your platform and input sources. They all work differently. Direct Input and XInput will allow joystick movement when the window is not in focus, Raw Input will not. OSX and Linux are not tested. Mouse and keyboard input while out of focus may vary across platforms as well.
     
  18. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    we will be using windows platform only. We are using XInput only. We plan to use Xbox controller with mouse keyboard combos
     
  19. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Rewired doesn't allow XInput-only configurations. XInput always runs alongside of either Raw Input or Direct Input. Either way, you could easily add focus detection in your code to ignore input regardless of what Rewired returns.

    http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationFocus.html

    Set a flag and ignore input if not in focus.
     
  20. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    Thanks for the link. What I'd really like to know is if we're getting separated input from all the controllers in different game instances. I was just wondering if the two rewired input managers were smart enough to know the difference between the controllers for each instance of the game.
     
  21. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    XInput is Xinput. If you have a controller plugged in, all programs that call to XInput will see it. You can't have a joystick plugged in and only one process see it. The same is true for Raw Input and Direct Input. They're global. This doesn't have anything to do with how Rewired works, it's how Windows works. If you press a button on a joystick, all applications monitoring Raw Input, XInput, Direct Input, etc. will see that button press.

    Your configuration of Rewired, Players, Controller Maps, assignments etc. are of course restricted to the instance of Unity it's running in. There's no possible inter-process communication.
     
  22. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    Great, that's what I was wondering. Just needed to know if I needed to implement this myself or if it was included in Rewired.
     
  23. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    However, as mentioned before, the current implementation of Raw Input does not receive messages when the window is out of focus. XInput and Direct Input do. If you need both windows to always react to joystick input regardless of which is in focus, choose Direct Input + XInput as your input sources.

    Mouse input is also ignored if not in focus.
     
  24. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    I was able to get this working pretty easily with some command line args. This application isn't for end users but for demo purposes. here is the code in case anyone is interested.

    Code (CSharp):
    1.  
    2. void Awake(){
    3.         string[] args = Environment.GetCommandLineArgs();
    4.         foreach( var item in args )
    5.         {
    6.             if( item.StartsWith( "/Controller=" ) )
    7.             {
    8.                 string num = item.Substring( 12 );
    9.                 int controllerNum;
    10.                 if( Int32.TryParse( num, out controllerNum ) )
    11.                 {
    12.                     CurrentGamepadController = controllerNum;
    13.                 }
    14.             }
    15.         }
    16.  
    17.        //If you don't have auto assign joysticks disabled in the Rewired Input Manager
    18.         foreach( Joystick j in ReInput.controllers.Joysticks )
    19.         {
    20.             ReInput.controllers.RemoveJoystickFromAllPlayers( j, false );
    21.         }
    22.  
    23.         AssignJoystickConfig();
    24.  
    25.         // Get the Rewired Player object for this player and keep it for the duration of the character's lifetime
    26.         player = ReInput.players.GetPlayer( "Player" );
    27. }
    28.  
    29.     private void AssignJoystickConfig()
    30.     {
    31.         if( ReInput.controllers.joystickCount > 1 )
    32.             switch( CurrentGamepadController )
    33.             {
    34.                 case 1:
    35.                     // Assign Joystick to first Player that doesn't have any assigned
    36.                     AssignJoystickToNextOpenPlayer( ReInput.controllers.Joysticks[ 0 ] );
    37.                     break;
    38.                 case 2:
    39.                     // Assign Joystick to first Player that doesn't have any assigned
    40.                     AssignJoystickToNextOpenPlayer( ReInput.controllers.Joysticks[ 1 ] );
    41.                     break;
    42.             }
    43.         else
    44.         {
    45.             foreach( Joystick j in ReInput.controllers.Joysticks )
    46.             {
    47.                 // Assign Joystick to first Player that doesn't have any assigned
    48.                 AssignJoystickToNextOpenPlayer( j );
    49.             }
    50.         }
    51.     }
    52.  
    53.     // This will be called when a controller is connected
    54.     private void OnControllerConnected( ControllerStatusChangedEventArgs args )
    55.     {
    56.         //Debug.Log( "A controller was connected! Name = " + args.name + " Id = " + args.controllerId + " Type = " + args.controllerType );
    57.         if( args.controllerType != ControllerType.Joystick )
    58.             return; // skip if this isn't a Joystick
    59.  
    60.         AssignJoystickConfig();
    61.     }
    62.  
    63.     private void AssignJoystickToNextOpenPlayer( Joystick j )
    64.     {
    65.         if( ReInput.controllers.IsJoystickAssigned( j ) )
    66.             return; // Joystick is already assigned
    67.  
    68.         foreach( Player p in ReInput.players.Players )
    69.         {
    70.             if( p.controllers.joystickCount > 0 )
    71.                 continue; // player already has a joystick
    72.             p.controllers.AddController( j, true ); // assign joystick to player
    73.             return;
    74.         }
    75.     }
    76.  
    77.  
    [/code]
     
    Last edited: Oct 22, 2015
  25. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    A couple of issues:
    1. There's no point in de-assigning controllers first. Just disable Auto Joystick Assignment in the Rewired Input Manager.
    2. In AssignJoystickConfig, you're treating the Joystick ID as an index -- it's not. It's a unique identifier (counter). You start unplugging and plugging in different controllers and you won't get the right results. The ID could be any int value. If you want the joystick by index, use ReInput.controllers.Joysticks[index].
     
  26. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    I did disable auto joystick assignment in the RewiredInputManager, but it was still assigning the first joystick somehow, that's why I added the unassign call. I'll test again to make sure.

    I appreciate your input, I'll be sure to update the index appropriately.

    Thanks again for such an awesome product. You rock man.
     
    Last edited: Oct 22, 2015
  27. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    That's not possible because auto assignment code only runs if configVars.autoAssignJoysticks == True :

    Code (csharp):
    1. // From the Rewired source
    2. public void JoystickConnected(Joystick joystick) {
    3.  
    4.     if(configVars.autoAssignJoysticks) {
    5.         // Do joystick auto-assignment
    6.         // ...
    7.     }
    8. }
    9.  
    10. // Config Vars is directly set by the Rewired Input Manager settings page toggle boxes.
    11.  
    Thanks!
     
  28. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    guavaman and Karearea like this.
  29. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    That looks like a great game. With a USB transmitter are you are limited to one RC controller? I was wondering if multiple RC controllers work with a single USB transmitter. The air racing part got my attention.
     
  30. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    Yes One USB Dongle has only 2 axis on it. One per transmitter. You are allowed 10 dongles or any style controllers per player in game. Rewired makes it too easy, as I can literally just play with one.... unplug and plug in another and keep rolling in seconds.
     
  31. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    59
    Have you found a way to integrate Rewired with iRDS? Thanks in advance!
     
  32. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Hi @elektronische,

    Sorry have not had time to look into this. Have been working on getting the native iRDS input working with force feedback and racing wheel.

    Have mentioned to Rhod (excellent guy) from iRDS who is willing to lend a hand setting this up.

    I suggest we move to iRDS forum to continue discussions there.

    Regards
    G.
     
    diegoadrada likes this.
  33. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    A while back I examined iRDS for gibmation. It looked fairly straightforward to modify the iRDS script. See this message for details. (Disclaimer: If you don't know anything about scripting, then this won't help you.)
     
  34. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    59
    Thanks a lot guavaman! I think that this is going to work!
     
    guavaman likes this.
  35. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    182
    Do you guys plan on making an integration for Adventure Creator in the future? I want to try UFPS/Rewired/Adventure Creator. And even though UFPS/Rewired play along and AC/UFPS also, there might be a problem because AC attempts to take input directly from UFPS.
     
  36. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    It looks like Tony Li has integrated all 3 without any problems. Did you see his post yet?

    http://forum.unity3d.com/threads/ad...nture-games-demo-video-website.204414/page-22 (see msg #1083)
     
    reocwolf likes this.
  37. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    182
    Yeah. IDK what it was.
     
  38. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Hi,

    I currently don't have any plans to make any more asset integrations at the present time. I will evaluate requests individually.

    The process of converting a script from Unity input to Rewired is outlined here: http://guavaman.com/projects/rewired/docs/HowTos.html#converting-scripts
     
  39. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    @guavaman I would be creating the script for integrating Rewired into iRDS, would let you know if i need any help or have any questions ;)

    Cheers!

    Rhod,
     
  40. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Excellent! Thanks for your help! This will work out a lot better anyway since I really don't like having to modify other packages' source code to provide integration. It's too fragile. (Though I don't think this would be necessary for iRDS looking back at the info I have.) If you need any help, just LMK. I'll send you a PM.
     
  41. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    We are looking forward to the results. I think @gibmation will be happy to hear this. Have to put all of those racing wheels to work.
     
  42. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Rewired 1.0.0.73 is available for registered users to download on the website. If you'd like to register to download early updates, please contact me here. The Unity Asset Store should get the update in 5-10 days.

    This update includes the optional new native input source SDL2 for Windows, OSX, and Linux. The primary purpose is for Linux/SteamOS to support Steam Streaming control since Steam is based around SDL2. Note that SDL2 does not support as many controllers as Rewired's own native implementation, nor is support for devices as robust (no per-device pre calibration, some elements may not work, some device identification issues, less robust vibration support). Also, it's primarily intended for gamepads, so if your game supports flight controllers, racing wheels, etc. you are better off using Rewired's own native implementation.

    Included SDL2 gamepad mappings can be found here. No non-gamepad devices have been mapped for SDL2 at this time.

    Note: Due to requiring Steam Greenlight status to test, Steam Streaming has not been tested with the new SDL2 implementation yet.

    1.0.0.73:

    Changes:
    - Added SDL2 input source option for Windows Standalone, OSX Standalone, and Linux Standalone.
    - Added option to choose input source(s) by platform in Rewired Input Manager.
    - Input source now falls back to Unity Input when in Xbox One mode in the Unity editor.
    - Added support for Guide button on XInput devices on Windows when using XInput.
    - Added Default Joystick Dead Zone Type option to Rewired Input Manager.
    - RewiredStandaloneInputModule now continues to work when destroying a Rewired Input Manager and instantiating a new one.

    New Controller Definitions:
    - Razer Serval
    - Linux Native: XBox One Controller
    - Linux Fallback: XBox One Controller
    - Many new SDL2 Game Controller mappings (Windows, OSX, Linux, when using SDL2 as input source)

    Bug Fixes:
    - ActionElementMap.actionCategoryId has been deprecated. Will be removed in a future release.
    - Native HID device failure on OSX is handled more gracefully.
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    See my post here. When I get a chance, I'll post a script there that uses Adventure Creator's delegates to use Rewired.
     
    guavaman likes this.
  44. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Thanks Tony for posting.
     
  45. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Rewired 1.0.0.74 is available for registered users to download on the website. If you'd like to register to download early updates, please contact me here. The Unity Asset Store version will be uploaded after 1.0.0.73 is approved.

    This update brings support for MFi controllers on OSX including pressure-sensitive buttons. Simply call player.GetAxis as usual and pressure-sensitive buttons will return a 0.0 - 1.0 value. GetButton will return True/False as usual as well the instant the button is pressed, so if you don't need pressure sensitivity, no problem. It includes a definition for one MFi controller currently, but more will be coming.

    1.0.0.74:

    Changes:
    - OSX Native: Now supports pressure-sensitive buttons on MFi controllers.

    New Controller Definitions:
    - OSX Native: SteelSeries Stratus XL (MFi)

    API Changes:
    - Added Controller.Button.isPressureSensitive property
    - Added Controller.Button.pressure property
    - Added Controller.Button.pressurePrev property
     
    Last edited: Oct 30, 2015
    Xander-Davis likes this.
  46. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Sometimes I think you have not seen enough controllers since you started worked working on Rewired. :):):):) Keep up the good work.

    That list of extended supported controllers is huge. I always have to keep scrolling and scrolling.

    http://guavaman.com/projects/rewired/docs/SupportedControllers.html
     
    rhodnius likes this.
  47. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Now that Apple TV is out with the Steelseries Nimbus (which is the ideal standard controller across the entire Apple Ecosystem now) I'm really looking forward to that having Native OS X support added! It already works with the standard MFi spec perfectly. :)
     
  48. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    This is on the Apple TV, correct? Because I need some identifying info to get support for the Nimbus on OSX. I'll PM you and you can get this info for me if that's okay. It shouldn't take long.
     
  49. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Okay thanks! The Nimbus works across all iOS devices + tvOS + Mac OS X. It's like a universal Apple game controller now (co-developed by Steelseries and Apple directly). It's hands down the best MFi controller on the market now, after the Horipad (which is iOS only).

    I'll check out the PM and get you that info ASAP. :) Updating Unity to the latest patch now and will update Rewired to test too. Thanks! :)
     
  50. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    Rewired 1.0.0.73 is now available on the Unity Asset Store!

    1.0.0.73:

    Changes:
    - Added SDL2 input source option for Windows Standalone, OSX Standalone, and Linux Standalone.
    - Added option to choose input source(s) by platform in Rewired Input Manager.
    - Input source now falls back to Unity Input when in Xbox One mode in the Unity editor.
    - Added support for Guide button on XInput devices on Windows when using XInput.
    - Added Default Joystick Dead Zone Type option to Rewired Input Manager.
    - RewiredStandaloneInputModule now continues to work when destroying a Rewired Input Manager and instantiating a new one.

    New Controller Definitions:
    - Razer Serval
    - Linux Native: XBox One Controller
    - Linux Fallback: XBox One Controller
    - Many new SDL2 Game Controller mappings (Windows, OSX, Linux, when using SDL2 as input source)

    Bug Fixes:
    - ActionElementMap.actionCategoryId has been deprecated. Will be removed in a future release.
    - Native HID device failure on OSX is handled more gracefully.