0 votes

I have a sprite and a Particle2D. I would like to prevent the particles emitted by the Particle2D node from following the parent. That way, it'll create this trailing effect when the sprite moves around. Is there a way to achieve this?

in Engine by (113 points)

2 Answers

+4 votes
Best answer

Yes, on the Particles2D inspector go under the Drawing and uncheck Local Coords, this will prevent the Particles from following the local coordinates of the Parent, and start emmiting as a Global Coordinates.

Hope it makes sense..

by (175 points)
selected by
+1 vote

Try detaching the particle from the parent and attaching it to the main scene. Something like this:

var root = get_tree().root
var main_scene = root.get_child(root.get_child_count() - 1)
get_parent().remove_child(self)
main_scene.add_child(self)
self.set_owner(main_scene)

self in this case is a particle node.

by (78 points)
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 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 webmaster@godotengine.org with your username.