- Home /
Need to Put buttons on Iphone/Android game
I am making game for Iphone / Android and I want to put buttons on the screen to move my car in front nd back ...Left and right .... Kind of Joystick feel that we can see in FIFA games or something ..How to go about it ?
Answer by DaveA · Oct 17, 2011 at 07:26 AM
Try the Joystick and/or Dual Joystick prefab
I added Joystick to my scene now .. and now trying to add code in my CarInput script ...... (for time being just working on forward and reverse )
if UNITY_ANDROID || UNITY_IPHONE
// forwardValue and reverseValue are float variables
forwardValue = Input.GetAxis("Vertical");
reverseValue = -1 * Input.GetAxis("Vertical");
endif
In Input $$anonymous$$anager setting I have changed the some Input Values.. like Vertical -> Type -> Joystick Axis Vertical-> Type -> Joystick 1
But its not working .... How to connect my Car Input to joystick...