Trail mesh, making the trail thicker and more visible

good day
regarding var newTrail = new BABYLON.TrailMesh(name, generator, scene, diameter, length, autoStart);,
it works great for me, except that the line of the trail gets kind of flat so sometimes you don’t see it well from certain angles, what do you recommend for making the trail line kind of more cyclindrical maybe? thicker? more visible? thank you :slight_smile:

Adding @FurcaTomasz who I believe is behind the trail mesh system.

1 Like

Maybe create two (or more) trails, with some angle between each trail?

For eg:

https://playground.babylonjs.com/#JMEVMN

There are 3 trails in this PG.

1 Like

With 3 trails it looks like real tail! :slight_smile:

1 Like

Don’t use trail Mesh. Instead use that as reference to draw and update a close path ribbon: https://playground.babylonjs.com/#3XMWZ#51

1 Like

@Evgeni_Popov that sounds like a good idea, how would you modify that to make the trail follow the mouse position and preventing the trails from dissappearing, so that they just create the path without the path dissappearing at all?

@HiteshSahu thank you interesting, not sure though how to use the reference of the trail to do that, could you maybe show me with a playground, making the path so that it doesn’t disappear after a while, so it stays fixed following the mouse for example and just drawing the path you make with mouse?

thank you :slight_smile:

Just set a very big length when calling the constructor of TrailMesh (5th parameter) for “infinite” trail, and to follow the mouse, just use the mouse coordinates for the mesh position (you will probably need Vector3.Unproject to convert from 2D to 3D coordinates).

1 Like

@Evgeni_Popov thank you perfect :wink: