As we are not generating all paths at the beginning of the game (because we want to save on memory and mainly because we do not know how far in the game the player will proceed, i.e. This stuff can be either a candy, or obstacle, or nothing at all. The SpawnPoints are positions in which new stuff will be generated. It also contains the NewPathSpawn game object (a simple location in the 3D space), and some other locations called SpawnPoints. The path is a prefab (as designated by its blue color) and all subsequent paths will be clones of this one. Scene also contains some cubical shaped 3D objects (named Cubes), which act as floor of our path. GameObject hierarchy in the straight paths level.įirst, there is the straight path game object which, by nature, is wider than the one in the “rotated paths” level. Let’s take a look at the objects contained in our game hierarchy. We’ll begin with the “straight paths” level. In the second and last part of the tutorial, we’ll see how the two game levels were built. As always, you can find the source code here on GitHub and play the game here on a WebGL enabled browser. If you haven’t read the first part, you’re highly encouraged to do it by clicking here. This is the second part of an infinite 3D runner game tutorial.
0 Comments
Leave a Reply. |