- Home /
Unity v4.6 Joystick?
Hey Unitarians,
I've wasted a solid hour or two on this so I've resorted to your help :)
Basically I want to have two joysticks in my game to control the character position and rotation. However, I've downloaded the totally awesome Unity 4.6, and with all of its fancy new UI tools, it can't seem to make a joystick!
I've spent a lot of time researching this, and I came up with a package on Unity forums that allows only one joystick to be able to be used as at a time. I can work with this for right now but I really do not like it. Is there any way or tutorila to create a dual joystick system?
If you guys could tell me how to use the legacy guitextures again in 4.6, that'd work too.
EDIT:
Guys I'm talking about a virtual joystick to use on mobile devices :P
Answer by jackhearts · Dec 01, 2014 at 12:59 AM
Isn't this what you're after?
Also, out of interest what exactly is it you're controlling that needs two joysticks? Or are you talking about a gamepad?
One joystick to move the character and the second to rotate the character
And I kinda meant virtual joysticks for mobile... sorry :P
oh right, well that's an easy answer then. Go on the asset store and search for mobile joysticks; no point reinventing the wheel. Or you can just hook in to the multi touch input events and work it all out yourself from there.
Answer by RemiR · Dec 01, 2014 at 07:59 AM
Personally, I use an old virtual joystick (with textures), and it's works fine with 4.6. But if you find one, i'm interested.
No see I would do that to, but how would I input the old textures? Unity doesn't give me an option to use that. How do you put them in?
With Unity 4.6, you can use again Texture2D (or Legacy UI) : http://docs.unity3d.com/ScriptReference/Texture2D.html
Here you can find a script for joystick (it works with GUITexture) : http://wiki.unity3d.com/index.php?title=Joystick