Hi,
I’m trying to get an effect similar to this using the line render and some math

I want to layout the vfx on line renderer before I try to do it on a mesh. I think I’m getting close but I have a few things to iron out, here my progress so far.

I don’t know how to dim out progressively the left end part. I’m open to suggestions. Here’s the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(LineRenderer))]
public class SimpleLineRenderer : MonoBehaviour
{
public int lengthOfLineRenderer = 20;
public Vector3 based = Vector3.zero;
public float amplitude;
public float decay = 5;
public float wavelength;
public float waveSpeed;
public float y;
public float x;
public float smallValueOnX = .001f;
void Start()
{
GetComponent<LineRenderer>().positionCount = lengthOfLineRenderer;
}
void Update()
{
LineRenderer lineRenderer = GetComponent<LineRenderer>();
int i = 0;
float k = 2 * Mathf.PI / wavelength;
float w = k * waveSpeed;
while (i < lengthOfLineRenderer)
{
x = i * smallValueOnX;
float s = Mathf.Pow(Mathf.Sin(Time.time/i), decay);
float z = Mathf.Pow(Mathf.Abs((Mathf.Sin((Time.time) / i))), decay);
y = Mathf.Abs((Mathf.Sin((k * x + w * (Time.time))))) * (amplitude);
//Debug.Log("Z: " + Mathf.Abs( z));
Vector3 pos = new Vector3(x, z * ( y), 0);
//Vector3 pos = new Vector3(x, Mathf.Abs(Mathf.Sin(k * (x + w) * (x + w) ) * (w - x) * Time.time) * amplitude);
lineRenderer.SetPosition(i, pos + based);
i++;
}
}
}