How to make the trail to be destroyed when a game subject is touched with a trail from TrailRenderer ?
For example: a cube moves forward and leaves a trail behind it, then the cube moves back and, when it comes in contact with the created trails, destroys them.
How to do it?

    1 answer 1

    It is very unlikely that the trail can, in principle, with any kind of crutches. After all, this is just a renderer, you just can not check the trail with the object.

    Perhaps an alternative solution is suitable through particles (Particles). Then you can destroy the particles on OnParticleCollision and get the desired result.

    • "you just can not check the trail with the object" - why then? At least the trail mesh can be used as a messenger for the collider. - RiotBr3aker
    • how to do it? can be more? - Vitaly Belousov
    • you hang up the particle component, set them up, hang up a script in your player that destroys everything that comes handy in the OnParticleCollision () method. Or you try to go by the method suggested by Riot - hang the mesCollider trail on the mesh and kill the nearest polygons on OnCollisionEnter (). But something xs what will come of it. Maybe something will fly out, and maybe what kind of behavior artifacts will come out ... - Andrew