Search Unity

human interface devices

Discussion in 'General Discussion' started by AaronC, Jul 27, 2006.

  1. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Hey guys, I was just curious, is anyone using any off the wall input devices? The consoles are a yes, correct?(PSI/2,xbox,xbox360)? So antenna and a few are messin with midi, right? hows that going? And does anyone have any leads on a handgun type thing, PS1 did it I believe, where you have a lead from yr plastic gun to yr usb port and you point it at the screen to shoot baddies. Anyone got one of those for PC/MAC that works w Unity?

    And how well do racing steering wheel/pedal setups go?

    AC
     
  2. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223
    Well, I programmed full dual-stick analog gamepad support for my game, and if that's any judge of other analog devices... they work great in Unity! Lots of control over just the right feel, and the user can customize the controls nicely too.
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Sorry for diverting this thread, but I may need to do the same for a project I'm looking at. Any hints/advice?
     
  4. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223
    Yes, one tip: for the two sticks, the choices in the Input Manager should be X Axis, Y Axis, 3rd Axis and 4th Axis. In other words, you don't specify a second stick with X and Y.

    At least, that made the defaults work with my Logitech RumblePad 2.

    It's really very simple--Unity's Input manager handles it for you. You just have to name the axes and refer to those names in your scripts. I also did custom acceleration, but I do that with mouse and key controls too. (One extra I implemented: I chose to "cut off the corners" of the stick input so you can't travel any faster diagonally than orthogonally.)

    Don't forget to multiply your stick input * Time.deltaTime. (Not needed with mouse delta input.)
     
  5. Martin

    Martin

    Joined:
    Aug 26, 2005
    Posts:
    61
    Hi,
    another question. Maybe related. Does anybody know market data how many Mac and PC gamers own joysticks or game pads? Or does most Mac/PC gamers just use their mouse and keyboard.

    Bye,
    Martin
     
  6. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223
    I have no data but I feel sure that the mousers outnumber the joystick-users (flight sim players) and the gamepad users.
     
  7. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    Good question, I have been wondering also.

    -Jeremy
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Well, I've got a gamepad. Hope that helps. ;) I'm pretty sure I'm in the minority, but there are enough of them on the market that I'd guess it's worth supporting, if that's what the question is. Unity makes it trivial to do so anyway...in fact, you don't actually have to do anything at all unless you're getting fancy with dual analog sticks.

    --Eric
     
  9. Martin

    Martin

    Joined:
    Aug 26, 2005
    Posts:
    61
    My concern was that some game genres highly depend on game pads. For example it is nice to play a FPS game with keyboard and mouse. But it is a real pain to play a Jump Run game with keyboard and mouse. At least I've never played a Jump Run game by keyboard which even came close to the game play of a Super Mario 64 with an analog game pad.

    So if the market share of game pads is low in the PC/Mac gamers world that could be a serious problem.

    Bye,
    Martin
     
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    That's true. You see the occasional direct port of console games to PCs and Macs, so there's obviously some market for it. (I have a few games that have "gamepad" in the recommended system requirements on the box.)

    --Eric
     
  11. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
  12. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223