- Home /
is there a tutorial to use usb controllers in Unity?
I am curious to learn how to control objects in Unity using an external controller.
Basically I would like a tutorial that tell me
1) what controls/codes is Unity expecting to get, when we use the Input class (does accept USB HID codes, like from a joystick or analog controller? Or keyboard stroke? )
2) How to take data from a controller, and transfer it to a game object, so I can manipulate its properties (transform and others, which will go in a script), trough an external controller.
I am experimenting with custom made controllers that are used by people with disabilities, and all that I was able to find is the input class.
Would be great to have some resources that show for example, how to take values from a potentiometer (like the joystick on a Xbox controller), or a button, that are attached on custom made usb controllers.
Thanks in advance.
Answer by fifthknotch · Mar 12, 2014 at 03:37 AM
I'm surprise no one has answered this yet. Here is a youtube video explaining how to get the joysticks to work on an xbox 360/pc controller, and here is another Unity Answers question someone asked which is similar to your question. Its answers are worth looking into.
$$anonymous$$uch appreciated! So the whole thing is configured in the UI manager, not via code...that's why I was not able to find anything. I thought that was logic to look in the input class to find how to set up each axis. I see that basically the system is set with defaults (which means that the mouse will always be used for looking and so on), so you assign the controller axis to these functionality. I was trying ins$$anonymous$$d to set everything from scratch, which explain the total lack of info whatsoever. Thanks for the reply!!! The video was quick and clear! The topic is a bit confusing, but there is a link to the unify community where there is a good article about the controller. I assume that is the same author of the video, since the controller image is the same. Thanks!!!
Your answer
Follow this Question
Related Questions
InputManager doesn't detect gamepad numbers correctly 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
how to move an object in 4 directions by tilting device when not parallel to the ground 0 Answers
iphone input 1 Answer
How to register more than 5 simultaneous key presses? New Input System 0 Answers