how to Create Controls for Mobile, like joystick, fire, kick, jump, attack etc??
Options
Hey everyone, I am Qasim Ali Cheema From Pakistan, can anyone help me? I made a basic game and its working perfectly, but i need to make controls for mobile and didnt found any solution yet, How can I create joystick and some other common controls for mobile? do anyone knows how to do it? or if anyone have any tutorial or solution in any easy form, kindly do tell me, i am stuck
0
Answers
-
Hello Qasim,
For my game, I create a canvas object to house my mobile buttons. I then create buttons (right click the canvas object, go to create and click button. Finally, I attach a script that has the function I want the button to perform. For example for a jump button, I would attach an script that has the Jump() function.
Read more here: https://docs.unity3d.com/Manual/script-Button.html
As for an on-screen joystick, the unity asset store has low cost and even free packages you can use such as: https://assetstore.unity.com/packages/tools/input-management/joystick-pack-1076310 -
Hello Qasim,
For my game, I create a canvas object to house my mobile buttons. I then create buttons (right click the canvas object, go to create and click button. Finally, I attach a script that has the function I want the button to perform. For example for a jump button, I would attach an script that has the Jump() function.
Read more here: https://docs.unity3d.com/Manual/script-Button.html
As for an on-screen joystick, the unity asset store has low cost and even free packages you can use such as: https://assetstore.unity.com/packages/tools/input-management/joystick-pack-107631
I did exactly the same but it's not working me0 -
Thanks for the input. Then this thread is probably outdated.0