So I'm trying to find a good tutorial which will explain how to controll character in 2D game when button is clicked (left, right, jump button).
All the tutorials I've found are outdated and not working.
Here's what I've tryed:
Created Button on Canvas and added C# script to it. Now I know how to control character with keyboard, but scince I' not developing for PC, that's useless for me.
I'm using something like this on PC:
GetComponent<Rigidbody2D>().velocity = new Vector3 (move * maxSpeed, GetComponent<Rigidbody2D>().velocity.y);
How can I convert it so it works for Android? For example, script that would move character to the right.
Thanks