GithubHelp home page GithubHelp logo

Comments (2)

daemon3000 avatar daemon3000 commented on July 30, 2024

My advice is to not use the Input Adapter at all, it's obsolete. Initially it was meant to solve the following issues:

  1. Abstract away the fact that the XBox 360 controller has different buttons codes on each OS.
  2. Allow you use use the DPAD and triggers as buttons instead of axes.

For point 1 it's much better to have a menu in your game where each player can rebind their buttons. Configure the game for the Windows XBox 360 drivers and let users on Mac and Linux rebind the buttons and axes. The added bonus with this solution is that the player can use any gamepad they want not just the XBox 360 one.

For point 2 you now have the Analog Button axis type which can convert any stick/trigger to button input.

If you don't want to allow the players to rebind the buttons you can also do it this way:

  • Make three XBox 360 configurations, one for each OS, and set them up to receive input from Joystick 1 for player One.
  • Write a script that runs at the start of the game and does the following:
    • For each of the other three players, clone player One's configurations and change the axis properties so it receives input from Joystick 2, Joystick 3 and Joystick 4. Look at the CloneControllerConfiguration.cs script to get an idea on how to do it.
    • Check what platform you run on and assign the corresponding configuration to each player.

from inputmanager.

oservieres avatar oservieres commented on July 30, 2024

Thank you very much for all these information ! I had the same kind of idea than you : declaring all the configurations possible for each player/platform and assigning the appropriate ones to the input manager based on the current platform.
But I didn't know that I could clone configuration. That may save a lot of time !

Thank you again.

from inputmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.