Unity 2D Tutorial How To Make Enemy Walk And Follow Along The Path Using Simple C# Script In a Game

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video I will show you how to create simple path that your enemy can follow along let's say that you have some 2d terrain and an enemy which you want to walk along some path to make this happen let's create new empty game object and name it as Waypoint reset its transform and add little red icon to make it visible here it is now let's duplicate it several times pressing ctrl + D keys and then let's position our waypoints in the order we want our enemy to walk enemy will be walking from first Waypoint to second one from second to third and so on to the last Waypoint at last waypoints position and mist ops in our case you can add more waypoints and position them along the curves to achieve more smooth movement okay to make this work we need a script here it is named follow the path it's commented so it will be quite easy to get how it works add this grip to enemy select enemy here is our script clock inspector window so it shows enemies options then select all of the waypoints and drag and drop them into waypoints section or follow the path script here we go that's it now we can hit play and see how it works enemy walks from one Waypoint to another following the path we set ok hope you like this tutorial thank you for watching see you next time you [Music]
Info
Channel: Alexander Zotov
Views: 56,623
Rating: undefined out of 5
Keywords: alexander zotov, unity tutorial, unity, game development, unity game, make unity game, Unity Tutorial How To Make Enemy To Walk And Follow Along The Path Using Simple C# Script In 2D Game, unity enemy movement, unity enemy walk, unity enemy follow the path, unity enemy move waypoints, unity enemy path, unity path follow 2d, unity 2d path, unity enemy 2d path, unity path following, unity simple path follow, unity enemy walk along path, unity enemy walk cycle, unity 2d tutorial
Id: KoFDDp5W5p0
Channel Id: undefined
Length: 1min 37sec (97 seconds)
Published: Tue May 22 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.