I am trying to replicate the endless scrolling of slither.io but, I can't figure out how to implement it. Since the players can move to any direction and the background needs to be available during player's displacement.
All the parallax background scrolling tutorials show only moving on one axis, either x or y, but my case it could be to any possible direction like an arrow compass.
Can some one point me in the right direction about how I can implement this effect?
EDIT: User can move to any possible direction like an arrow in a compass.
Custom Camera Controller that follows the player
public class CameraController : MonoBehaviour {
public GameObject Player;
private Vector3 offset;
// Use this for initialization
void Start () {
offset = transform.position - Player.transform.position;
}
// Update is called once per frame
void LateUpdate () {
transform.position = Player.transform.position + offset;
}
}