Search Unity

Trying to set up sixaxis gyro-controls on a PS3 gamepad (PC)

Discussion in 'Editor & General Support' started by Redz0ne, Jun 16, 2016.

  1. Redz0ne

    Redz0ne

    Joined:
    Oct 19, 2010
    Posts:
    332
    If anyone can give me a head's up on this as I've been googling and very little data has resulted.

    If I recall correctly, Unity3D does support developing for Sony hardware but so far the only input I have been able to find are basic controls. What I'm looking for is a way to use the sixaxis gyro controls without gimping other axes or the analog shoulder triggers.

    What I'm aiming for:
    • I want to see if I can emulate a control scheme that has some similarity in some ways to Star Fox Zero. So, when you tilt the gamepad, the aiming reticle will move with it.
    • I want the analog shoulder triggers to be independent so that I can pull both of them and get input data that I can use.
    • I want the two analog sticks to be free to use if at all possible. If only one can be used, I want it to be the left stick. That I have had no trouble with but when I try both sticks and the sixaxis gyro-controls, things get wonky.
    • I would prefer to have access to all the buttons (though I don't particularly need the PS3 logo button since this is more of a side-project so I can learn.)

    Basically, I need to know what resources I should be looking into in order to get this going (without having to go to the asset store. Sorry, but I am doing this more as an exercise to test myself and I can't justify the costs of a package for a casual side-project like this. Not trying to throw shade or anything like that but I'm asking for some help, not an advertisement. Besides, if I use an asset-store package, I won't be learning as much as I could.)

    EDIT: While this topic is being addressed... What if I wanted to take full advantage of the analog functions of the face buttons as well? So, for the PS3 sixaxis dualshock the X, O, triangle and square buttons do have analog functionality... So, how are they defined according to Unity so as to be able to integrate that sort of functionality?
     
    Last edited: Jun 16, 2016
  2. Redz0ne

    Redz0ne

    Joined:
    Oct 19, 2010
    Posts:
    332
    Wow, nobody?

    So, may as well bump this with some of the things I've done to see how far the functionality extends (which is a lot so I really don't get why this is such a hard question to ask without running into the "just use MotionInJoy(malware) or BetterDS3(which is limited in what functions it allows you to map which is a major flaw for what I need it for.)"

    I've done some testing and I can confirm that the PC can interpret the analog values using the BetterDS3 tools BUT when I do that I usually have to sacrifice something else like the analog stick or the triggers... Since I'm trying to use all the functions (mainly to determine how it should be set up) then this leaves me at a loss.

    I know this can work because I have gotten a positive hit when troubleshooting by gimping other analog functions and mapping them to the analog buttons and gyro controls... So I KNOW this can be done... But still no ideas on how to get this set up without having to shell out more than I can justify (or even have) on an asset-store package that may or may not do what I need it to do BECAUSE this seems to be a driver issue.

    I know this can be done... And I've even done some poking around in the input manager and seeing that Unity3D has slots for up to (iirc) 27 analog inputs which is more than this gamepad even has, this CAN be done.

    But not being a code-monkey I have no idea how to make a driver...

    Please don't tell me this is something I have to shell out the big bucks to get a Playstation dev-kit for... Surely there have been hackers out there that have done this very thing and have put together a decent driver that allows a PC user to use something OTHER than a Micorsoft gamepad.

    I've also tried using some other tips but those all trick the system into thinking it's an XBox controller. Yeah, what part of "SONY Gamepad" is hard to grok?

    I dunno. I'm getting frustrated because it seems like I keep running into walls trying to do this and it pisses me off just a little bit.