nealgoogs
nealgoogs

Reputation: 21

Trying to have no boundaries in my runner game

Still new to Unity. I am trying to make a 3D runner game. So I have a ground that is spawning as my player moves up the map. It spawns forward. However, I would like to make my ground spawn to the right and left side of my character so that my character never falls off the map. Just an endless ground spawn. How do I go about this?

I tried doing transform but the ground would spawn in a y axis instead of building along with the original gound.

Upvotes: 0

Views: 82

Answers (1)

RedStone
RedStone

Reputation: 289

Judging from what you wrote, it seems that you are holding the wrong axis when grabbing the currently created position. I don't know what type of runner game it is. There is a difference in the methods you can try when the character is fixed in place and when it is freely moving on the screen.

Fixed

  • The character only jumps in place, and the map is continuously created left and right, and you can make it by thinking that the map moves.
  • If the character passes through a specific point (eg the center of the map), you can create a map in the direction it crossed.

Moving

  • The second method suggested when it is fixed is a general example. If you want to design a map that can move up, down, left, and right, you need to think a little more. If you create a map on the top, bottom, left, and right in a repeating form, you can try a method similar to that created on the left and right.

You can find many examples by searching for keywords such as Endless Runner on YouTube or Google.

Upvotes: 1

Related Questions