- Home /
Polling analogs / buttons in inControl system
Hello, I usually use unity3d with the input manager, but I got a new gamepad and decided to have a go with inControl library (https://github.com/pbhogan/InControl)
In order to get the value of buttons / analogs (I'm using generic controller) I have tried:
using UnityEngine;
using System.Collections;
using InControl;
public class pax2 : MonoBehaviour {
// Use this for initialization
void Start () {
InputManager.Setup();
}
// Update is called once per frame
void Update () {
InputManager.Update();
Debug.Log ("Analog [1]: "+ InputManager.Devices[1].Analogs[1].Value ); // get analog 1 value
}
}
Values are reported back ok only the first time, afterwards they seem to be stuck. What am I missing?
Thanks in advance.
Answer by sharmoni · Feb 25, 2014 at 11:26 PM
looks like you're missing this line (taken from InContol SimpleExample script) in the Update function
// Use last device which provided input.
var inputDevice = InputManager.ActiveDevice;
Your answer
Follow this Question
Related Questions
What is the official (according to Sony) way to set up a PS3 controller? 0 Answers
Remote user game pads stuck on X axis, locally fine. 1 Answer
How to assign a determined joystick number to each specific gamepad? 3 Answers
Oculus Rift controller triggering Gamepad 1 Answer
Multiple Players on one Computer/Console 5 Answers