Infinite Addition Runner - Unity Tutorial #3

Опубликовано: 18 Март 2026
на канале: MaxMakesGames
494
13

In this part, we will add the player controller and regrouping mechanic. This will allow you to move all the blue characters by moving your mouse, finger or joystick. Also, using the player controller, the characters will regroup immediately after one of them is destroyed by a spike or something else.

I will also show some code that I came up with when I was making that game to spawn the characters in a circle form so they don't overlap on spawn. It works by checking for a collision in a sphere and if there is a collision, flipping the x or z and adding to the other axis. I'm not sure if it's very efficient, but it works pretty well. It could probably be optimised more if you checked how many players there are in the list and skip some checks depending on that. If there are 50 players already, of course there will be collisions at 0,0 haha.

---------------------------------

Subscribe for game making tutorials, other game-making related content and to follow my projects with the dev logs !

Check out my website for my other socials and if you want to see and try the games I made: https://bit.ly/MaxMakesGames

0:00 Intro
0:15 Player Controller
1:20 Input System
1:55 Player Input
4:07 Move Player Controller
4:50 Create Players
7:00 Move Players
11:50 Create Players in Circle
17:40 Responsive Player Movement
18:45 Deleting Players