I added a trail renderer to an object. It generates a trail but does not generate a shadow for the trail. I am using a default renderer (unity 2022.3.3).with default line material and cast shadows is enabled (see pic). Any suggestions for what I am doing wrong?
Lines and Trails are kinda squirrelly shadow-wise because they are by default billboarded to the camera.
This means the “shadow view” they cast can be extremely narrow.
Not only that but the default-line material simply does not make shadows (at least on my setup).
I did these things and got a shadow to cast off of a Line / Trail:
- switch Alignment to Transform Z
- switch to another material that DOES cast a shadow (test on a cube if in doubt)
Thanks. I checked my material and I had set it to transparent. Changing it to opaque now casts a trail shadow. I tried Alignment with transformZ but the trail becomes intermittent. Also, even with View alignment and a material casting a shadow, the trail shadow is intermittent and sometimes disappears for a while. Yeah, trail rendering seems a bit flakey as you said.
BTW: Is there some way to get trail fade using a material to set the color? It seems that fade only works with a builtin color.
