HELP!! Changing yincrement on swipe detection
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;
1) "player.Move(new Vector2 (transform.position.y + yincrement))" and
2) "player.Move(new Vector2(transform.position.y - yincrement))" with a
3) public float yincrement; BUT this just generates an error message.
Any help would be great, thanks!
Answer by ArtCBao · Jul 06, 2021 at 06:53 PM
Oh and I just found out my min and max height variable doesn't work neither....soooo any suggestions on this would be appreciated as well please
Your answer

Follow this Question
Related Questions
the player input is jittery seems like glitching 0 Answers
standoff 2 like character swipe 0 Answers
how to move by touching a point on mobile device like join clash game 0 Answers
How to tap while holding UI button ?(on touch screen) 0 Answers
How can i use a joystick for mobile game in this short movement script? 0 Answers