- Home /
New input device
Hi all, I am interested in using input devices other than the mouse and keyboard. I would like to use an RC controller in-game, like the kind you get with an RC car or plane or boat. Anyone know how to do this, or where to begin?
I have an esky usb controller: http://www.amazon.com/Flight-Simulator-Training-Airplanes-Helicopters/dp/7293000014/ref=sr_1_1?ie=UTF8&s=toys-and-games&qid=1277949630&sr=8-1 It has a usb connection to the computer and is used by some flight sim softwares so I know the hardware works, question is how to make it work with unity.
If you have any experience doing something similar please advise. Thank you. Gary
Answer by AnaRhisT · Jul 01, 2010 at 02:09 AM
Yeah.. Joystick buttons. General explanation about it Edit->Project Settings->Input. class-InputManager Use KeyCode's for Joystick : KeyCode
Answer by Noise crime · Jul 01, 2010 at 05:06 AM
As the original answer says, you can most likely treat it as a joystick in Unity as a quick search revealed it to be used in games/simulators as a replacement for standard controllers. If it is treated as a standard USB joystick, you just need to determine the mapping, this page may be useful for that.
If that doesn't work ( though i'd be very surpised if it doesn't) you'd need to find information on drivers it uses and preferably a dll to talk directly to it via USB. Though that is probably unlikely to happen unless the manufacture has released it to the public.
A final option, though a bit pointless with this controler since it comes with usb is to go the direct electronic route, that is cracking open a controller and directly soldering wires to the circuit board, linking them to a USB controller circuit board, then using a dll /plugin to interface with Unity. I've done that in the past with Director based on this tutorial and proved to be great fun. I used MiniBee in this case, but Arduino is also popular and I'm sure I remember reading that someone had a plugin or some other support for it in Unity.
Your answer
Follow this Question
Related Questions
What devices are supported in Unity 1 Answer
unity device simulator use WASD to control 0 Answers
Can't get multiple microphone channels 3 Answers
How to tell if the device is android or ios 3 Answers
new input device 0 Answers