Uploaded August 2021 | Updated September 2026, 3 weeks ago
#unityswipe #unitymove #unityandroid #unitymobile
In this video I show you a quite simple script that will help you to move your character or any game object up, down, left and right with finger swipe in a mobile game (Android or iOS). Also a simple animation is implemented.
I play games here - twitch.tv/zzotoff
You are very welcome :-)
Thank you :-)
Previous videos
2D Top Down Grid Based Movement - youtu.be/b17fYOlRkck
Simple Animation For Character Movement - youtu.be/zvkSFzAjGas
Project Here drive.google.com/file/d/1ebuUabd75HvnVq0bXhBNdMI81IRoUYAo/view?usp=sharing
In the previous videos which you can get by the link in the description I created this simple project. I recommend taking a look at those videos. In this project I can move my character with the arrow buttons of my keyboard. To make it possible to use this movement feature on mobile platforms I modified my script a bit. Here it is. I use a start touch and end touch positions to determine which way my character should go. Coroutine is used here as well. So in the update method instead of reading keyboard input I get touch input. Start touch position is obtained when I touch the screen. End touch position is obtained when I release my finger. And depending on coordinates and differences between those positions a corresponding direction is passed to coroutine which performs the movement and simple animation.
#unityswipe #unitymove #unityandroid #unitymobile
In this video I show you a quite simple script that will help you to move your character or any game object up, down, left and right with finger swipe in a mobile game (Android or iOS). Also a simple animation is implemented.
I play games here - twitch.tv/zzotoff
You are very welcome :-)
Thank you :-)
Previous videos
2D Top Down Grid Based Movement - youtu.be/b17fYOlRkck
Simple Animation For Character Movement - youtu.be/zvkSFzAjGas
Project Here drive.google.com/file/d/1ebuUabd75HvnVq0bXhBNdMI81IRoUYAo/view?usp=sharing
In the previous videos which you can get by the link in the description I created this simple project. I recommend taking a look at those videos. In this project I can move my character with the arrow buttons of my keyboard. To make it possible to use this movement feature on mobile platforms I modified my script a bit. Here it is. I use a start touch and end touch positions to determine which way my character should go. Coroutine is used here as well. So in the update method instead of reading keyboard input I get touch input. Start touch position is obtained when I touch the screen. End touch position is obtained when I release my finger. And depending on coordinates and differences between those positions a corresponding direction is passed to coroutine which performs the movement and simple animation.










