Vigyata.AI
Is this your channel?

Unreal Engine 5.1 Endless Runner Tutorial - Part 10.1: Spawning Magnet Power Ups

5.2K views· 17:28· Sep 13, 2023

🛍️ Products Mentioned (6)

Welcome back to part 10.1 of our tutorial series for creating an Endless Runner game in Unreal Engine 5.1! In this video, we'll show you how to Spawn Magnet Powerup and Make player collect them. Watch part 10.2 here: https://youtu.be/WR9FFYfbqWQ 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 on Patreon: https://patreon.com/shivasgaming 00:00 Disclaimer 00:14 Introduction 00:40 Importing Magnet 01:00 Modifying Magnet Material 02:00 Magnet Blueprint 07:10 Spawning Magnets 12:00 Collect Coins with Magnet 15:25 Fixing some Issues 17:19 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, unreal character

About This Video

In Part 10.1 of my Unreal Engine 5.1 Endless Runner series, I add a Magnet Power Up and make the player collect it properly. I start by importing the magnet model, then I quickly fix the materials so it actually looks good in-game—metallic to 1, roughness around 0.3, and I slightly reduce the base color value (but I don’t make it too dark). After that, I create the collectible by duplicating my BP_Coin, swapping the mesh to the magnet, adjusting scale/rotation, and keeping the pickup sound logic (I use a different sound so it feels separate from coins). Then I wire up the gameplay: I add an “Is Magnet Active” boolean in BP_RunnerCharacter, and inside the magnet blueprint I toggle it ON, wait 5 seconds, and toggle it OFF again. Next, I make magnets spawn in the level by adding separate powerup spawn points in BP_Floor and a Spawn Powerups function that drops BP_PowerUp_Magnet as a child actor. To avoid spawning on every tile, I track Floor Count in BP_RunnerGameMode and only spawn a magnet every 5 floors (then reset the count). Finally, I make coins auto-collect while the magnet is active by adding a sphere collision + a simple timeline slide toward the player using VInterp To. I also fix the common issue where the floor gets destroyed before the magnet deactivates by extending the floor lifetime (don’t push it too high—40+ can hurt performance).

Frequently Asked Questions

🎬 More from Shiva's Gaming Zone