So basically I have a 2D texture track on a quad mesh which will infinitely scroll down and repeat. But I want to add point lights on the marks of the tracks and make it move WITH the marks as it goes down and repeat just like the tracks. Is this possible ? https://imgur.com/a/ZrsUW42 The code to move the track: Code (CSharp): using UnityEngine; public class TrackMove : MonoBehaviour { public float speed; Vector2 offset; void Start () { } void Update () { offset = new Vector2(0, Time.time * speed); GetComponent<Renderer>().material.mainTextureOffset = offset; } }
Yeah, it can be done. You'll just need a pool of point lights and you'll configure them based on how far apart the marks are, how many there are, and the current offset of your background.