Hey Community,
So I’m new to coding and unity. I’m trying to make an endless runner on mobile. I incorporated swipe mechanics on it but I want to adjust how far up and down the player goes. I can’t figure out how to change the yincrement that the player travels with on a swipe.
I tried changing the player.move line to;
- “player.Move(new Vector2 (transform.position.y + yincrement))” and
- “player.Move(new Vector2(transform.position.y - yincrement))” with a
- public float yincrement; BUT this just generates an error message.
Any help would be great, thanks!
