Uploaded August 2021 | Updated September 2026, 2 weeks ago
#unitymove #unitymovement #unityanimation
In this video I show you a quite simple script that helps you to move a character with cool animation.
I play games here - twitch.tv/zzotoff
You are very welcome :-)
Thank you :-)
Previous Video
2D Top Down Grid Based Movement
youtu.be/b17fYOlRkck
Project Here drive.google.com/file/d/1WmXWnmOgORRljc7F3B5JNmXbku_hgUz_/view?usp=sharing
So in the previous video which you can get by the link in the description I created this simple project. I recommend starting from that video actually. But this video is good enough as well. In that project my character was moving without any animation. So here I created a script that allows me to perform that simple animated movement. Here it is. Here I use a coroutine. Coroutine allowed variable will not let me start a new coroutine while the previous one is still running. Update method. Here, depending on which arrow button I pressed, I pass a direction to coroutine so my character will be moved up down left or right. Coroutine code makes that movement and animation possible. So the first block of code makes my character smaller with three steps of 0.2 and moves my character according to the given direction. The second part of coroutine makes a character bigger back and keeps him moving. The penultimate line of code just gives a character one more step to make it stick to the grid. Script is attached to my character. Hit play and see how cool it is.
#unitymove #unitymovement #unityanimation
In this video I show you a quite simple script that helps you to move a character with cool animation.
I play games here - twitch.tv/zzotoff
You are very welcome :-)
Thank you :-)
Previous Video
2D Top Down Grid Based Movement
youtu.be/b17fYOlRkck
Project Here drive.google.com/file/d/1WmXWnmOgORRljc7F3B5JNmXbku_hgUz_/view?usp=sharing
So in the previous video which you can get by the link in the description I created this simple project. I recommend starting from that video actually. But this video is good enough as well. In that project my character was moving without any animation. So here I created a script that allows me to perform that simple animated movement. Here it is. Here I use a coroutine. Coroutine allowed variable will not let me start a new coroutine while the previous one is still running. Update method. Here, depending on which arrow button I pressed, I pass a direction to coroutine so my character will be moved up down left or right. Coroutine code makes that movement and animation possible. So the first block of code makes my character smaller with three steps of 0.2 and moves my character according to the given direction. The second part of coroutine makes a character bigger back and keeps him moving. The penultimate line of code just gives a character one more step to make it stick to the grid. Script is attached to my character. Hit play and see how cool it is.