Hey all, I’m trying to workout how to utilize XInput.NET and sadly I’m fairly new to unity, and I’m not finding any useful documentation. It would be nice to get my Controller working using this.
From what I’ve managed to figure out keeping in mind I’m not actually a programmer, and what programming I do is in JS. I’ve managed to get it detecting the Triggers and Thumbsticks
//R Stick X axis
if(state.ThumbSticks.Right.X > 0.5){
Debug.Log("StickR = Right");
}
if(state.ThumbSticks.Right.X < -0.5){
Debug.Log("StickR = Left");
}
//R Stick Y axis
if(state.ThumbSticks.Right.Y > 0.5){
Debug.Log("StickR = Up");
}
if(state.ThumbSticks.Right.Y < -0.5){
Debug.Log("StickR = Down");
}
//Triggers
if(state.Triggers.Right > 0.5){
Debug.Log("Right Trigger");
}
if(state.Triggers.Left > 0.5){
Debug.Log("Left Trigger");
}
That’s all well and good but I’m having issues making the Buttons work, it would, triggering vibration would also be helpful but not overly necessary.
For those who haven’t seen this before but think its cool, (and chances are, you’re smarter than I am and could solve my problem). You can get XInput.Net from here
http://speps.fr/xinputdotnet