Jump to content
  • Advertisement
idzohar

Need help on this top down road code

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!