Physical trail

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kallistotele

I’m making a clone of tron, I’m using the Godot Trail System to leave a trail behind the player.
I just want to make the trail physical so that players die if they collide with it, I looked in the inspector of the Trail3D and I couldn’t find anything helpful.
The Trail3D node is a child of the player node, I only set the segments number, the lifetime and the material.
I’m a beginner so I can’t find a solution that works for me.

:bust_in_silhouette: Reply From: Mrpaolosarino

I think adding collision to the particle makes it an fps eater. What I recommend though is to add a certain area where if you enter in it, you will die. At the same time, it is emitting trails nonetheless

I managed to create a trail using a SurfaceTool, it’s created in a mesh instance, so it can create a collision box from the mesh.
The only problem I have now is that, as you said, it eats fps because the trail has a lot of vertexes created every time. But I can’t use another area, because I need the trail to detect collisions precisely as soon as possible. If I created a tiny invisible wall once in a while, it wouldn’t be precise when I turn, and I would need to create a lot of them, too much of them

Kallistotele | 2021-03-22 15:15