Reputation: 1
I am trying to make a game that has similar pipe spawning methods as flappy bird, although I cannot find a useable script as every "Tutorial" I see either is not modular AT ALL so it is extremely difficult to edit to fit my game, or could help but I cannot read the code as it shows the code at 144p (a bit of a exaggeration but it sure doesn't feel like it) so I need to know some methods of making a script for unity that has pipes (That I already have made) spawn at a certain point at different y levels. Any help would be appreciated a lot as I will turn to YouTube as a last resort for now on, thank you :)
Upvotes: -3
Views: 136
Reputation: 15
Create vector 3, use random.range to randomize the y value.
Add that vector3 onto whatever position you are currently using.
Use instantiate and pass in the new position
Upvotes: 0