Quantcast
Channel: Questions in topic: "side-scrolling"
Viewing all articles
Browse latest Browse all 99

Leapfrog background set pieces as camera scrolls?

$
0
0
I'm am extremely new to coding and am not sure how to go about doing this. I'm working on a side scrolling runner of my own. I have done the unity runner tutorial module and tried to get it to work for what I needed, but I just couldn't figure it out. I have a perspective camera that follows the player on the x axis. I have multiple layers of background objects set to different distances from the camera to achieve a parallax effect. Each layer consists of 3 "set pieces" or objects next to each other to create a landscape. My question is this: How can I get it so that as soon as the main camera hits position.x = 50; the first background piece leaps to the front, then at 100; the second leaps, and at 150; the third, and continue this loop forever until the player crashes and game over?

Viewing all articles
Browse latest Browse all 99

Trending Articles



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