This might sound a little strange but I am making a simple game where there is a pig and you have to tap the screen to make it move directly forward. I have no idea whatsoever how to do this because I have only done coding for a little while, plus, I’m still in primary school. I really need a script for the tap to move!
Any code or help will be appreciated!
Well I recommend reading into programming then But for now, here a very detailed iOS beginners guide for unity: Beginning Unity 3D for iOS: Part 1/3 | Kodeco
At the end, it shows you how to make a cube move by touch, so you can use this
You need an Update method that checks for touches, then moves the object forward. Something like
void Update() {
if (Input.touches > 0)
{
transform.position += new Vector3(1, 0, 0);
}
}