Back to Browse

Endless Runner in Unity - Adding Obstacles Tutorial

1.2K views
Apr 9, 2024
4:06

In this tutorial, I will teach you how to add obstacles in your Endless Runner game in Unity. I will also teach you the easiest way you could make your own obstacle in Unity, so you can also do the same in your project. First of all, the spikes require a small script that will be powered by OnTriggerEnter. In the previous video, I have created a platform generator. Now with the spikes attached to one platform you can do the same in other platforms. The spikes are required to bring the player back to the start position, but there is no health system in this game, so it will be added in the future videos. This tutorial is almost identical to the Respawn tutorial, but the Vector3 position is defined as a script component, not as a position code. To add spikes to the platforms, add a simple cube and place it slightly above the platform. You can put them anywhere to make the game more interesting. Then you should add some objects that will make the spike plate look realistic. This spike plate will consist of cones that are imported as a 3D model from Blender, for a simple reason that there is no Cone in Unity 3D. Make sure to set Is Trigger and it will work fine. Support the Creator of Kozmobot on the social networks! CHECK OUT MY WEBSITE: http://kozmobot.com INSTAGRAM: https://www.instagram.com/kozmobot.channel TIKTOK: https://www.tiktok.com/@kozmobot.channel

Download

1 formats

Video Formats

360pmp47.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Endless Runner in Unity - Adding Obstacles Tutorial | NatokHD