- Home /
Question by
numberkruncher · Feb 05, 2012 at 08:31 PM ·
iosinputiphonecontrol
How to set up virtual D-Pad for iOS?
I have managed to add the standard mobile asset "Single Joystick" to my app and it appears to be working fine. I would like to switch to a D-Pad type input because I feel that it will be better suited for my game. How can this be achieved?
Is there a standard asset for this?
Comment
Best Answer
Answer by Airmand · Feb 05, 2012 at 09:53 PM
I dont have Unity iOS but i assume you could add buttons with Arrow Textures in the form you want with input.touches.
Cheers, I managed to create my own DPad controller using Input.touches
. I have set aside a rectangle area on a GUITexture
and calculate the axis from the center of the rectangle. I had to keep track of which finger is touching the DPad.