0 votes

I made a dash trail using a particles2D node. When the dash button is hit, the particles node becomes visible and is supposed to leave behind ghosts of the player until the dash effect ends. It works perfectly the first time, and sometimes the 2nd time, but the location of the ghost trail becomes increasingly crazy and wrong as the number of dashes I do increases.

In my particles 2D node basically every possible setting is checked off or at zero.

Video of trail

in Engine by (100 points)

can you unprivate the video? i'd like to answer your question

Whoops my bad. Should be working now
https://youtu.be/cvrAoDxQH0o

ok, i get the problem now

1 Answer

+1 vote
Best answer

So what I think you're doing is that you're hiding the dash particle node when you dont need it, and you show it when necessary. (i assume you're also setting the "emmiting" property to true only when necessary.)

The reason why the trail particles are going in random places, is because they are staying where you put them when they're first created. So everytime you show the particles node, instead of it showing where you were a second ago, it shows you where you were the last time you "dashed"

A better solution would be to set the "one shot" property of the particles node and to only set the "emitting" property to true when you press the dash button. this way you dont have to hide the node, neither do you need to set emitting to false, as it automatically stops emitting as soon as all the particles go away.

hope this fixes your problem!

by (451 points)
selected by

yup that worked perfectly! Thanks!

glad i helped!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.