- Home /
what is the best way to make an auto-scrolling camera?,auto scrolling camera setup?
so a friend and myself are attempting to make a runner/rhythm game. not unlike the rayman music levels from the rayman legends. except we want the camera to automatically scroll instead of follow the player.
the reasoning behind this is that we want to use camera to world space to make a 'killzone' so that if the player falls too far behind he dies. obviously this means that the camera can't just follow the player.
presently our solution's was to make a camera follow scripts. but instead of using the player as the game objects that the camera follows, it uses another random object that moves at a constant pace through the level.
this has led to some issues however. the movement of the object can be very jittery sometimes so the whole screen became jittery. so we added more liens of code to have the camera follow more smoothly but then it tends to lag too far behind and throw the players position out of sync with the music.
i've tried looking online for answers about making an 'on rails' camera but all i ever get is how to make a 2D side scrolling camera that follows the player. not one that moves independantly.,
Your answer
![](https://koobas.hobune.stream/wayback/20220612191213im_/https://answers.unity.com/themes/thub/images/avi.jpg)