In this unity tutorial, you'll learn how to make a joystick touch control for our player movement in a 2d top-down game.
Touch control is an important component for mobile games. We will first add our joystick UI into the game and add a C# script to it. The script allows the joystick to move to the position of the user touch and return back to its original position when user are no longer touching on the screen.
Lastly, we will add another C# script for our player. The script allows our player to move when the user drags on the joystick and It will stop moving when the user is no longer touching on the joystick.
➤Kenny Onscreen Controls: www.kenney.nl/...
Timestamps:
0:00 Intro
0:21 Joystick UI Setup
1:13 Rigidbody2D Setup
1:32 Joystick Scripting
4:30 Player Scripting
5:20 Conclusion
#Hooson #Unity3D
Play my first mobile game: Bot Attack - 2D Top-down shooter
➤Google Play: play.google.co...
➤App Store: Coming soon
➤Follow my Instagram: / hoosontech
17 авг 2024