Search Unity

Direct Input Is NOT supported "OFFICIAL from unity"...... Now what?

Discussion in 'Editor & General Support' started by devotid, May 16, 2012.

Thread Status:
Not open for further replies.
  1. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    wow.

    I payed 1500 bucks for a game engine that doesnt support game controllers?

    unbelievable.

    here is the "official answer form support"

    what i wrote:

    I have purchased PRO and tried to upgrade to 3.5.x. I used a back up
    copy of my project and the Direct input is no longer supported. I tried
    the registry hacks that were working for me as a "work around" for 3.4.2
    and they no longer work. I then did a bunch more research in the forums
    and "answers" and found a supposed "new reg hack for 3.5.x"........ Well
    long story short it does not work at all either.

    I am using generic USB input dongle style controllers (rc radio
    controllers) and none of them will access the windows calibrated "direct
    input" they all are using the RAW input. Which will simply not work for
    my application. I have verified all this with DXtweak and Windows
    calibration system across 5 different controllers......all acting
    identical.

    Is there a way to make this work with 3.5.x? As I am at a total loss to
    the new features that i had just payed $1500.00 for.

    I have posted three to four threads about this and have received NO
    useful help at all.

    Is Direct Input supported in 3.5.x? YES or NO?

    Thank you.

    Kevin
    "devotid"



    and this is what i got in return from UNITY support.......

    I guess I'm screwed if i want to use direct input? It also says to set them back to original....but then is blank........UUUUUUUGGGGGHHHHHHHHH......face palm.

    Hi,

    DirectInput support has been dropped in favor of RawInput. If you had a registry hack in place you should remove it

    Changed keys:

    [HKEY_CURRENT_USER\Software\Unity\Player]
    "Input"="DirectInput"
    [HKEY_CURRENT_USER\Software\Unity\UnityEditor]
    "Input"="DirectInput"

    Setting them back to original:

    [HKEY_CURRENT_USER\Software\Unity\Player]
    "Input"=
    [HKEY_CURRENT_USER\Software\Unity\UnityEditor]
    "Input"=

    We are fixing the code for Unity 3.5.3 so that this hack does not affect any game, it will simply ignore it.

    If you have a device that does not work with RawIput, but it's visible and supported in the Windows (http://www.microsoft.com/windows/compatibility/windows-7/en-us/default.aspx), we would like to heard about it.

    Regards,
    Ricardo
     
  2. Rob_Fireproof

    Rob_Fireproof

    Joined:
    Jan 16, 2012
    Posts:
    9
    If you've got a pro license, you've got the ability to code custom dlls which can interface with your scripts. I don't know much about DirectInput specifically, but I suspect you could write a little dll interface to the bits of it you want, write a tidy C# wrapper for that, and then use it in all your other scripts.

    Have a look here: http://unity3d.com/support/documentation/Manual/Plugins.html
     
  3. Swearsoft

    Swearsoft

    Joined:
    Mar 19, 2009
    Posts:
    1,632
    By remove/change to back to original they mean: change it too blank

    From what I understand if you were already using a hack to get it to work you
    are better off switching to RaInput anwyay.

    What is the issue with RawInput?

    K.
     
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I have a device that uses both xinput and directinput (i can switch between the two), problem is, I can't seem to find a way to get XInput to work (if there is a way to install it into Unity properly) :/... it would be awesome to work with my xbox remote if I could get XInput working...
     
  5. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    The Problem with raw input is it uses the raw output data from the joysticks (without going through windows calibration tool) and then none of my joysticks are centered properly (4-5 joysticks)..... all my vehicles travel with a faint arc to whatever way they are off. then the steering lock to lock is different per controllers..... there really is literally NO calibration at all.

    When using Direct input in 3.4.2 (with the registry hacks) it works with the windows calibrated data and everything is fine. working great from -1,0,1

    Did they switch to support this different method because of something? and Why?

    How many car games are going to be made with no support steering wheels?

    If someone knows how to write this .dll to make 3.5.1 work with Direct input. I have cash right now.

    Kevin
     
  6. George Foot

    George Foot

    Joined:
    Feb 22, 2012
    Posts:
    399
    I see, maybe you can explain that to them more clearly? The last few lines of the email make it sound like they are interested in any reason this causes you problems.
     
  7. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Well, here is some good news... i am working in 3.5 of Unity and using a Logitech F310 controllers set in Direct Input mode... had no problems with it and no registry hacks either... :) My own issue is getting this to work with XInput...
     
  8. Swearsoft

    Swearsoft

    Joined:
    Mar 19, 2009
    Posts:
    1,632
    Obviously they had a reason from dropping support (though I wouldn't call using hacks support).

    I think it would be pretty simple to calibrate a joystick by just asking the user to leave the joystick centered
    and press a button, you get this info as center and set them as offsets. Your input code would have a variable
    added to each direction and with the press of the button you would set the values for those variables.

    I'm betting you can do it without asking the player too, when he presses "Any button to start" and simply
    add this is as an option in Settings in order to make sure the user wasn't accidentally fiddling with the joysticks.

    Since they ask you to post devices which will not be supported and you have some in mind, send them to them.
     
  9. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
  10. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    i am working on a simple example to show how this is not working with my controllers...... hopefully have it done i a day or so... there has to be more folks than me having this problem....at least i hope im not the only one...lol

    @Koyima i like the idea of being able to build my own in game calibration tool...... i really didnt know this was possible to be honest..... i think i can do this. If this would work i would be FINE. Because like i have said on a few other threads....... my controllers actually work ok....its just that they dont center properly and dont get "full lock" in one direction..... (ie: they only go about -1, 0, .087.....NOT -1, 0, 1 like it should)

    if i could just calibrate the damn things to get full stroke i wouldnt care that im loosing a couple resolution steps in either direction....... at least i could go straight down the straightaways and turn the same amount in each direction.

    anybody know of any info or links to building a ingame calibration tool........ i use Playmaker visual scripting tool ....so im kind of limited on what i can accomplish on my own......

    Thanks as always for any help you can provide.

    Kevin
    devotid
     
  11. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    +1 I would LOVE THIS!!
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I have a lame no brand joystick with all possible inputs (bit like a ps3 controller) and it works flawless with unity. Perhaps you need code your game properly by utilizing a deadzone like every single commercial game ever made that supports analogue. Just a thought.

    Calibration is zero guarantee that a joystick will not move if stationary. Some joysticks are more sensitive than others. If unity is seeing that drift it merely means that it isn't trying to compensate (it shouldn't - it's our job to do that).

    Several solutions:

    1. add a tiny deadzone or change the input settings
    2. read the rest state when game starts (some xbox / console games do this, which is why if you have it pressed at an angle when loading, it can get stuck like that).

    But don't listen to me, you're obviously all selling games so you know best.
     
    Last edited: May 19, 2012
  13. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    Dont worry im not.

    but really.....wow.

    6,000 + posts and thats the great knowledge you offer huh? An insult? Your life must really suck.

    You can go .......yourself Hippo.

    ah forget it.....i think I just got Professionally trolled.

    but......

    for you info.... i am using a adjustable coded in dead zone.
    ----- EDITED .......

    Some people are still learning here and havent spent their ENTIRE lives inside a CPU like you have.....maybe someday when your grown up like the rest of the world you can go outside and see for yourself .

    Kevin.
     
    Last edited: May 24, 2012
  14. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    ------- edited.

    Kevin
     
    Last edited: May 24, 2012
  15. cannon

    cannon

    Joined:
    Jun 5, 2009
    Posts:
    751
    Erm... ignoring some of the passion in this thread, but here's an idea of one workaround you can do:

    - Aside from reading the rest position, make the player do a hard lower left, store that x as your leftmost and that y as your bottom-most
    - then make the player do a full upper-right, store that x as your right and y as your top
    - Then store those values

    Then just do ratios for both.

    Pre-Windows games had a joystick calibration step like this.

    Some games would hide the calibration step by making the player go through a tutorial, and instead of giving explicit steps for calibration they make up an excuse to have the player move the characters left and right as part of a tutorial and calibrate on that behind the scenes.

    One thing to note is that you cannot assume that the values you get are linear; IIRC there tends to be more ticks when moving right than when moving left, so just cutting the left to right values in half won't give you the center position.
     
  16. Swearsoft

    Swearsoft

    Joined:
    Mar 19, 2009
    Posts:
    1,632
    @hippo:
    Isn't number 2 what I said?

    Why are you assuming we won't listen to you, this is your first post on the thread?
    You stirred some major rage here for no apparent reason...

    Anyway @Devotid I assumed you had looked into your Input settings, so if you haven't or did and changed stuff around maybe you should go through them again, but as you say teh controllers have different problems.


    Cannon's calibration is even more elaborate, I would start with something simple though and see if it's adequate, then move on to something more complex.
     
  17. cannon

    cannon

    Joined:
    Jun 5, 2009
    Posts:
    751
    @koyima

    Oops, missed that you had already explained the calibration process to him

    @devotid

    If you have difficulty implementing it in Playmaker, you might have better luck searching for someone to help you in the Commercial Work forum; the basic version of this should be cheap to get a freelancer for (less than an hour of work for an example scene that does only this).
     
  18. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    445
    Thanks guys i appreciate your help :)....... i think im going to go the route of storing centers my self in a simple in game calibrator..... (as titles of my style usually include a calibration step out in the open.) I did not know that this could be done until bouncing ideas off of you guys. Thanks. As i dont have a lot of coding experience.... talking it out with others helps me tremendously.

    And Thanks Cannon.... i did not realize there was a place i could list "wanted ads for help". I will look into this. but Im pretty confident after you guys explained the concept of what needs to happen......that i can do it in Playmaker. (which is mind blowing BTW)



    Reason for my "stiff" reply.......

    ive seen this Hippo person do this in other threads....... and im tired of His/Her Elite-ism.
    Im here to help others and be assisted by others...... He or She simply degraded me for not knowing something......So i just returned the favor.

    Kevin.
     
  19. Smooth-P

    Smooth-P

    Joined:
    Sep 15, 2012
    Posts:
    214
    Lol. I'm having a user report issues with joystick / "analog" devices on windows, notably a Logitech G13 which is working fine for him in other games or with x360ce, when in my searching I find this gem of a post. What a sad sack of S***.

    And as I do know at least as well as a sad sack of S***, I already have my own deadzone (wtf did this have to do with anything?) and rest state reading, as well as a calibration button to reset the rest state. Which works fine when an axis is well behaved, with the rest state approximately at center, min, or max, along with a full range of motion, but doesn't fix mangled input.

    Is the solution to this problem to code in more complex calibration math (simple enough) along with an 80's DOS style calibration dance UI and rigamarole (uggghhhhhhhh)? Given the description of the behavior, the physical rest state / center seems to be reporting at a corner with no headroom, and I don't see how that can be fixed.

    Edit: Maybe lowering the sensitivity when someone has a "bad" device, plus manual calibration math? Right now, as the hippo said, I have devices that work fine with 1 sens axes, so I don't want to ship with Input manager changes targeted at rare devices... But that would mean forcing users to edit those settings, and... well yeah. God, I had forgotten how truly and mindbogglingly horrible the input layer is.
     
    Last edited: Dec 24, 2013
  20. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Locked to prevent necro.
     
Thread Status:
Not open for further replies.