r/unity_tutorials • u/LlamAcademyOfficial • Aug 23 '22
Video Making a mobile game that needs movement? Learn how to add a Movement Joystick with Unity's New Input System Enhanced Touch API! Full Tutorial in Comments with Full Project on GitHub!
92
Upvotes
2
u/LlamAcademyOfficial Aug 23 '22
Full Tutorial on YouTube
Hey all! Happy #TutorialTuesday!
This week you can learn how to add a Touch Movement Joystick to control your player using the New Input System. We'll specifically look at how to do that with a NavMeshAgent, but the same concept can be applied to Rigidbody movement or a CharacterController. In this tutorial you'll learn the full end to end process of Joystick Creation, Canvas Setup, & Code, along with some of the "gotchas" I learned when implementing my own mobile game so you don't have to run into the same struggles!
The Enhanced Touch API raises events
onFingerDown,onFingerMove, andonFingerUpevents to us when the user touches, moves, or lets go of the screen. It keeps track of which finger is doing what, so we can track each finger separately.As always, the full project code is available on GitHub for you to play around with.