Vigyata.AI
Is this your channel?

Unreal Engine 5.1 Endless Runner Tutorial - Part 5: Adding Obstacles

14.3K views· 11:07· Jul 17, 2023

🛍️ Products Mentioned (7)

Welcome back to the fifth part of our tutorial series for creating an Endless Runner game in Unreal Engine 5.1! In this video, we'll show you how to add randomly spawning Obstacles. Stay tuned for more updates in our tutorial series, and don't hesitate to ask any questions in the comments section. Assets: https://bit.ly/3pCAXJ7 Note: Before using any of the assets, please make sure to read the Readme file provided. Get the Endless runner project files here: https://shop.shivadev.com/b/erprojectfiles Note: The project files are constantly updated to reflect the latest tutorial in the series. Stay Connected: Discord: https://discord.gg/zFZ43Hjs3R Twitter: https://twitter.com/shivasgaming75 GitHub: https://github.com/Shiva9168 Instagram: https://www.instagram.com/shivas_gamingzone/ Portfolio: https://shiva9168.github.io/ Email: shivasgaming75[at]gmail.com Support Me: Patreon: https://patreon.com/shivasgaming PayPal: https://paypal.me/Shivasgaming Help me make more content by donating! 00:00 Disclaimer 00:15 Intro 00:25 Creating Spawn Points Function 03:20 Creating Obstacles Blueprints 03:58 Creating Blocker Obstacle 05:23 Importing Wall Obstacle 06:05 Adding the Mesh to the Obstacle Blueprint 06:26 Creating Spawning Obstacle Function 09:03 Creating Floor Tile 09:29 Adding the Floor Tile to the Level 10:10 Final Preview 10:54 Outro Track Title: Tranquility Music by: TeknoAXE Music Link: https://youtu.be/08ddPOJnTL4 // Ignore the tags below. They are provided for reference purposes only. Tags: #gamedevelopment , #unrealengine5 , Endless Runner Tutorial, Game Design, Game Programming, Game Tutorial, Indie Game Dev, Game Development Series, Endless Runner, #Subwaysurfers , #tutorial , Game Development for Beginners, Game Development Tutorial, Game Development Step-by-Step, Game Development Walkthrough, 3d Character, unreal character, #animation

About This Video

In part 5 of my Unreal Engine 5.1 Endless Runner series, I focus on one of the most important pieces of replayability: obstacles that spawn randomly. I start inside my BP_Floor blueprint by creating a “Setup Spawn Points” function. I bring in the same Lane Position array I’m using in the runner character, loop through it, and generate arrow components so I can visually see exactly where obstacles can appear. Once the arrows are in place, I also fix alignment by shifting the floor and adjusting the arrow and box collision offsets so everything lines up correctly. After that, I build a simple obstacle system using a base BP_Obstacles actor and two child blueprints: a Wall and a Blocker. The Blocker is made from cube meshes with destructible collision, and the Wall uses an imported box mesh with a quick material setup (including a metallic constant set to 1). Then I create a “Spawn Obstacles” function that shuffles the spawn points, picks a random count and a random obstacle type using Switch on Int, and places them using child actor components. Finally, I set up simple FloorTiles for level layout and preview the gameplay—yes, you can slide through the blocker because I disable capsule collision during the slide montage and enable it again afterward.

Frequently Asked Questions

🎬 More from Shiva's Gaming Zone