filmov
tv
Simple Animation For Character Movement In Your 2D Top Down Game Made With Unity Software
Показать описание
#unitymove #unitymovement #unityanimation
In this video I show you a quite simple script that helps you to move a character with cool animation.
TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store
Guess The Movie Is Available On Play Market For Free For Android devices
Here is the link
If you like what I'm doing then you can support me through
or here
Or You Can Become A Sponsor Of My Channel
Thank you :-)
Previous Video
2D Top Down Grid Based Movement
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.
In this video I show you a quite simple script that helps you to move a character with cool animation.
TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store
Guess The Movie Is Available On Play Market For Free For Android devices
Here is the link
If you like what I'm doing then you can support me through
or here
Or You Can Become A Sponsor Of My Channel
Thank you :-)
Previous Video
2D Top Down Grid Based Movement
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.
Комментарии