How do I know what gamepad input is being triggered?

0 favourites
  • 5 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I have a generic USB controller I'm using on an arcade cabinet.

    Made a game using dpad buttons, was all good on computer. But then tested on arcade cab and found the joystick mapped to X and Y axis, not POV. NOTE: There is no left/right stick, just X/Y.

    So I rewrote the controls code to detect the X/Y of the Left analog stick.

    Tested the game on the arcade again and...it still doesn't work.

    How can I find out what input is being detected when I move the joystick (so that I can map it within the code)?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Generally you would plug in the input device in question, preview and test, set it properly, and it's a once and done kinda thing. If you can't connect your joystick to your development machine, that's what remote preview is for.

    If you want to get fancy, you could try to map the controls on first run and save the resulting map to localstorage.

  • But I don't know what to map them to.

    I have no idea how Construct3 is detecting the joystick. It's not defective, it shows up on html gamepad testers as axis 0. But how do I map this within Construct3?

  • Does the gamepad example work on your arcade input?

    editor.construct.net

  • Bizarrely, it does.

    At first I thought, "maybe it's mapped to the right axis?". But then I've made an example program here to test inputs and it said it's the left stick.

    dropbox.com/s/96hn02r0haqyxjx/ControllerDetect.c3p

    Then I tested a new export of my game and...it works! Although fullscreen isn't working for some reason, but that's another thread!

    Thanks for your help anyway, and for pointing me towards that example. I've seen it before, but reminds me to not assume directions are mapped to the left stick (could be right as well).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)