Particles venting

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Panagiotis Halatsako

I have not made any code yet, this is just a thought I had this morning.

Is it possible to make a confined area (tilemap set, a room) fill up with particle2d?

For example, player hits a light and then a vent starts pumping poison on the floor up to the ceiling. Is this something that can be done?

:bust_in_silhouette: Reply From: FortunePilot

EDIT - Particle2D collision does not exist. This answer is obsolete.

Yes! Here’s a little idea of how it could work:

  • Have your particles physics set up correctly, aka, your particles move left, right and up. Also make sure they push eachother a little bit!
  • Make sure your collision between the tilemap tiles and the particles is set up so the particles don’t go through the ceiling and walls.
  • Make the spawning of the particle2D’s stop when they do not exit the spawn area quickly enough (when the room is full of poison).
  • Make sure your particles don’t collide with the player.

Do all this, and you should be set!
If there are any questions as to how to code these specifically, feel free to ask them!

Kind regards,

~FortunePilot

Correct me if I’m wrong, but I was under the impression Godot cannot do colliding particles? How would you do it? Using a shader? Am I missing something obvious?

njamster | 2020-04-27 12:31

Sorry, I think I got it mixed up. My thought was that particle2d’s had a form of collision enabled. Checked it out, was not the case, my bad.

On to a different approach then:
Maybe there’s a way to combine an emission mask with the spread variable?

FortunePilot | 2020-04-27 13:28