Vigyata.AI
Is this your channel?

Unreal Engine 5.1 Endless Runner Tutorial - Part 18: Moving Obstacles

3.6K views· 17:47· May 20, 2024

🛍️ Products Mentioned (7)

Welcome back to part 18 of our tutorial series on creating an Endless Runner game in Unreal Engine 5.1! In this video, I'll be adding moving obstacles such as vehicles into our game. 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! -- Timestamps -- 00:00 Disclaimer 00:15 Intro 00:30 Importing Vehicle Meshes 01:45 Creating Moving Obstacle BP 09:00 Spawning Moving Obstacles 13:30 Preview Moving Obstacles 14:15 Creating Stationary Alternatives of Moving Obstacles 15:45 Spawning Stationary Obstacles 17:05 Final Result 17:39 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 , #animation , #powerups , #endlessrunner , #Subwaysurfers , #tutorial , Endless Runner Tutorial, Game Design, Game Programming, Game Tutorial, Indie Game Dev, Game Development Series, Endless Runner , Game Development for Beginners, Game Development Tutorial, Game Development Step-by-Step, Game Development Walkthrough, 3d Character, Spawning Buildings, Buildings, Skyline, Environment

About This Video

In Part 18 of my Unreal Engine 5.1 Endless Runner series, I add moving obstacles—specifically moving cars—so the level feels more alive and reactive. I’m using the free Vehicle Variety Pack from the Unreal Marketplace (the regular one, not the Volume pack), and I also show the workaround if you’re on UE 5.0/5.1/5.2 where the asset doesn’t show as compatible: enable “Show all projects” and add it using version 4.27. After importing, I pick a couple meshes (Sports Car and Hatchback), but the same setup works for any moving obstacle, not just vehicles. I create a child blueprint from BP_Obstacle (like BP_Car1), set up the mesh scale/rotation, and build two box collisions: a small one for the actual hit/death, and a larger trigger that starts the movement when the player overlaps it. For the movement, I use a Timeline and a simple Lerp on the X location, using an Arrow component as the target reference. When the Timeline finishes, I delay a bit and destroy the actor, and I also mention where a “Play Sound Attached” fits if you want vehicle audio. Finally, I hook spawning into BP_Floor with a “Spawn Cars / Spawn Moving Obstacles” function, using a Floor Count variable in the GameMode plus randomness to control frequency. As an optional extra, I also create stationary vehicle variants and spawn them as alternatives so the obstacle variety stays interesting.

Frequently Asked Questions

🎬 More from Shiva's Gaming Zone