godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.95k stars 20.17k forks source link

ParticlesAttractor2D missing in Godot 3 #18223

Closed Ranoller closed 4 years ago

Ranoller commented 6 years ago

Godot version:

Godot 3 All systems

OS/device including version:

All systems

Issue description:

I know that it was removed due incompatibilities with the new particles system. But there is no issue opened for that and there is risk of forgot this awesome feature left in the way. So there is the issue to remember that.

ghost commented 6 years ago

remember @bojidar-bg saying that it might be possible to create the same effect with the new particle system. however, still think maybe a particle attractor node would be ideal. i miss it greatly too =]

Ranoller commented 6 years ago

I try to emulate this node very hard. It´s not casuality that i remember that, i was trying to adapt a menu screen from godot 2 that uses this node (attract or reject the particles at some variable position in the canvas), and there is no substitute, behaviour seems impossible to emulate... but if somebody knows how, please document. (I really think is not possible)

Bauxitedev commented 6 years ago

You can sort of emulate it by setting Radial Acceleration to a negative number. This will cause the particles to be sucked towards the center of the particle emitter.

img

But, of course it's not ideal, because you want to be able to change the attraction point separately from the emission point.

Ranoller commented 6 years ago

This allow you to do a kind of "ParticlesFollowPoint", it´s ok... but behavior that i need to emulate is rejecting-attracting individual particles with moving objects, and this is only feasible with the ParticlesAttractor node. Things like Smoke that rejects when a character pass inside, lasers/plasma that vibrate when the character pass, etc...., all that thing now are needed to do with animation, or with very trickery and not performant workarounds (like using collision bodies and not particles). ParticlesAttractor were a very awesome feature of godot 2, and lost that was a great regression for me. If i were enough confident with c++ i would try to reimplement myself, but that is not the case.

eon-s commented 6 years ago

Maybe it could be possible to feed the particles shader with a texture that can be used to affect the velocity to simulate attraction.

ghost commented 5 years ago

https://github.com/godotengine/godot/commit/cf834a22dc78950a9fba484a7f9db98da84cae59#diff-531cda3564322c1a2ce4d0a3b33f5852

Please for the love of god let's get it back!! One of the greatest node's stripped from Godot 3. Now, since we got CPUParticles2D back, is it possible to get the attractor node? :D

eon-s commented 5 years ago

Is on the roadmap https://github.com/godotengine/godot-roadmap/blob/master/ROADMAP.md

But I guess this will be for 3.2 or 4.0...

ghost commented 5 years ago

Lol, dang. I was just thinking it could be re-added since there is the CPUParticles2D now (w/o a re-write/port). I assume the CPUParticles2D is not the same as from 2.x versions then. Which that makes sense. Man, one of my all time favorite nodes and very underrated imo. You could create amazing effects with that attractor.

clayjohn commented 4 years ago

This is still planned for 4.0! But we are now tracking 4.0 changes to the particle system in the proposals repo here https://github.com/godotengine/godot-proposals/issues/815. Further discussion should take place there.

And yes, particle attractors were mentioned there already, so no need to add another comment :)