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
here’s the link to download : GitHub - JISyed/Unity-XboxCtrlrInput: XboxCtrlrInput is a C# wrapper for Unity3D that aims to handle Xbox 360 controller input with multiple controllers on multiple platforms
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