0 votes

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?

in Engine by (64 points)

1 Answer

0 votes

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

by (53 points)
edited by

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?

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?

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.