How to create a 2d trail

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bruno_ortiz
:warning: Old Version Published before Godot 3 was released.

Hi guys, i’m trying to create a trail, just like in the image:

enter image description here

Can someone help me? please! :smiley:

ty

Look/try this plugin https://github.com/LeonardMeagher2/Godot-Assets/tree/master/Plugins/Trails

It does not use a shader but just a polygon, as many trail systems do.

eons | 2016-12-13 18:17

I’m working on a Line2D and Trail2D node in C++ for doing exactly that, not ready yet but I hope it’ll be integrated one day :slight_smile: Have a way to draw polygon-lines · Issue #7242 · godotengine/godot · GitHub

Zylann | 2016-12-13 18:47

The plugins works as expected! Thank a lot!

bruno_ortiz | 2016-12-13 19:38

Wow, i hope to @Zylann :smiley:

bruno_ortiz | 2016-12-13 19:39

@eons - Just curious, how do you use that plugin?

avencherus | 2016-12-13 23:27

I got it to work by copying the Trails/ folder under an addons/ folder, then enable the plugin in Scene->Project Settings->Addons and you will be able to create Trail2D and Trail3D nodes.

Zylann | 2016-12-13 23:55

I didn’t have any problems enabling it. Just the nodes don’t seem to do anything on the canvas.

avencherus | 2016-12-14 00:21

You have to run a scene and move it around. Also don’t forget to set a color, apparently it’s set to null by default.

Zylann | 2016-12-14 00:22

Tried that, wasn’t having any luck with. Even attaching it to a sprite and animating it didn’t show anything. Hmm.

avencherus | 2016-12-14 00:28

Nevermind, I tried messing with it as tool mode, and the emission flag was getting unset.

avencherus | 2016-12-14 00:29

Oh. Well, here is a test project anyways, just run it: http://zylannprods.fr/dl/godot/TestTrailsPlugin.zip

Zylann | 2016-12-14 00:40

Thanks Zylann, that’s actually a very helpful way of experimenting with it.

avencherus | 2016-12-14 00:48

Is a very old plugins so it needs some manual fixes to get it working, like the directory as @zylann explained.

I guess it can be optimized a bit too but works fine even the 3D one on Android (where other engines fail).

eons | 2016-12-14 04:11