How to manage Input from 2 - 4 Gamepads
hi at all !
after searching, reading for hours i found a tool which enables to manage Input from several gamepads, especially Input from the same Buttons on each pad. Which isn't possible without a tool
Answer by Ego65 · Feb 25, 2017 at 07:21 AM
here's the link to download : https://github.com/JISyed/Unity-XboxCtrlrInput
it's free and up to date (Unity 5.5) and well documentated ! And it works perfectly !
by the way: many thx to JISyed !
the only one prob i had was that the sensitivity of the joysticks handling was very very high. And wasn't to change in the editor. So i've left it to 1 in the editor and set a float
( steeringfactor) in my playerscripts like this
using UnityEngine;
using XboxCtrlrInput;
.
.
.
public XboxController playerNumber = XboxController.Second;
// Turning
m_currTurn = 0.0f;
float turnAxis= XCI.GetAxis(XboxAxis.LeftStickX, playerNumber);
if (Mathf.Abs(turnAxis) > m_deadZone)
m_currTurn = turnAxis * steeringfactor; // st_f = 0.175f
//for example how the same buttons are used
// Booster
if( XCI.GetButton(XboxButton.A, playerNumber) )
{
boost = m_forwardAcl * PowerBoost;
m_body.AddRelativeForce(0 ,0,boost);
MaxBoost = MaxBoost-1;
}
I'm using a PS3 and XBox like gamepad. Both are little bit different in their own sensitivity and this way it' s pretty easy to adjust each pad.
I hope this will be helpful for any other user especially for beginners as i am still :)
yours
Your answer
Follow this Question
Related Questions
How to handle multiple gamepads in new Input System? 1 Answer
Local multiplayer New Input System 0 Answers
using Oculus Remote with new input system 0 Answers
How to keep players from interacting with same object? / How to only detect specific player inputs? 0 Answers
How use ANDROID NAVIGATION BUTTONS 0 Answers