How do I make a collidable trail?

I’m doing a simple snake game in which the snake needs a collidable trail that is left behind.

I managed to leave a trail behind the snake using the trail renderer but I can’t find a way to make it collide with its own trail.

Any help is greatly appreciated!

well, you could save the snake positions of the matrix, then check if the head position still in your body positions array, if it does, then throw a collision, its the simplest way i think, since i am not sure about raycast works with line renderer.
good luck