You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HighGroundRoyaleNetcode/Assets/Scripts/ScrollingLineRenderer.cs

20 lines
554 B
C#

using UnityEngine;
public class ScrollingLineRenderer : MonoBehaviour
{
public LineRenderer lineRenderer;
public Material scrollingMaterial;
public float speed = 1.0f; // Adjust speed in Inspector
public float tiling = 1.0f; // Controls how many arrows fit in the line
void Update()
{
if (scrollingMaterial == null) return;
// Scroll texture over time
float offset = Time.time * speed;
scrollingMaterial.SetFloat("_Speed", speed);
scrollingMaterial.SetFloat("_Tiling", -tiling);
}
}