In my game you can control the character by moving left and right, jumping and attacking. (This is a mobile game) I have a button that I use to jump and attack, which is easy because I just make a button and jump or attack with OnClick(). But for moving, I don’t know how to find out if the user is pressing the button, I only know when it is clicked. How can I find this out? thanks.
- Read the documentation on
Input
class. - Implement some code that handles
Touch
, and can work out where the user has touched the screen. - Learn how to ask better questions.