Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Need help on this top down road code

$
0
0
I am trying to make a top down 2d racing game. I want the player to only ever "drive" toward the top of the screen and have the road move downward. I want the road to be made of segments that I can swap with differing pieces of road. I am trying to get this implemented in unity using C#. When I run my code, the road pieces move downward and then only the 1st and 3rd segments disappear at -10. All 3 of the segments remain in my hierarchy, however. Can Somebody please help me? GameController.cs PlayerController.cs RoadController.cs

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>