Godot Path2D and PathFollow2D Tutorial | Bonus: Ysort Solution
Game Development Center
In this Godot Path2D tutorial, I will teach you how to make an enemy or object follow a path2D with help of a PathFollow2D. This will allow you to make patrol paths in Godot! As a bonus, I teach you a solution for an often encountered problem when adding the objects and enemies to a map with Ysorting.
0015: Path2D and PathFollow2D 03:06 Adding an Enemy to the Path 05:15 Code to Move Over Path 09:48 The Path2d – YSort Problem 11:11 RemoteTransform2D, The Solution
In your games you don't want your enemies to stand still. You want them to feel dynamic, not static. One easy first step is to let enemies patrol certain regions of your game world. You can do that with Godot Path2D and PathFollow2D nodes. These nodes allow you to define a path which your enemies can patrol. In just 4 lines of code, you can make the enemy follow that path2D. As a bonus I teach you a patrol people often encounter with Path2D and PathFollow2D when they use it in combination with Ysorting nodes on their maps. I teach you how to use the remoteTransform2D, quick and easy so that your enemies are drawn in the draw order that you want!
Follow me on Twitch and chat, watch and learn Godot and GameDev with a big group of Godot developers: https://twitch.tv/stefan_gamedev
I stream every Tuesday and Thursday from 19:00 to 22:00 (GMT+1/2 (winter/summertime), that's; 12:00 to 15:00 (PST), or 15:00 to 18:00 (EST).
If you like to show some support, I currently do not have a Patreon page as many have asked, instead you can drop a sub on twitch: https://www.twitch.tv/subs/stefan_gamedev or if you are more into sharing some support without public trails you can hit me with a donation on my donation page: https://streamelements.com/stefan_gamedev/tip
Want to learn more? Check these resources (referral) to up your GameDev Game :) Game Programming Patterns | For all coding languages | https://amzn.to/35IoDsH
Temporarily deals (referral)! Valid till 27 May on HumbleBumble, a HUGE discount on video game music from a single composer. Listen to previews on Soundcloud, pick your pack, from as low as $1,50 https://www.humblebundle.com/software/big-music-bundle-for-games-films-and-content-creators-software?partner=stefangamedev
Check out the new discord! Ask questions, share ideas, find other devs :) https://discord.gg/DwcFXyS
Follow me on Twitter to get some sneak peeks for upcoming content, and the occasion poll on what we should be doing next on here and stream: https://twitter.com/GamedevStefan
GDC, Game Development Center, was created to provide in-depth tutorials on game design and game development with Godot. We aim for multi-part tutori ... https://www.youtube.com/watch?v=-JOI9HzPanw
78434352 Bytes