- Home /
Kill Particles Entering 2D Trigger
I have a 2D scene with a particle system and a square. I would like to give the square a Box Collider 2D as a Trigger (necessary for other parts of the scene) and have the particles die when they enter the square. To do so, I enable "Triggers" on the particle system, put the square in the "Colliders" field, and set "Inside" to "Kill." However, the particles pass through the box.
I also tried changing the type of the collider on the square with the same settings on the particle system, with the following (somewhat surprising) results:
Box Collider 3D, isTrigger = False: Particles do not pass through box
Box Collider 3D, isTrigger = True: Particles do not pass through box
Box Collider 2D, isTrigger = False: Particles do not pass through box
Box Collider 2D, isTrigger = True: Particles do pass through box
How can I get particles to die using a 2D Collider as a Trigger?
Hi, did you find the solution for your problem? I am facing the same issue.
Answer by mcedgarsanchez · Aug 02, 2020 at 07:58 PM
Hi, did you find a solution for your problem? I am facing the same issue.
Well for this situation, you can just use a Box Collider 3D. From my testing, it seems like Box Collider 2D does not work with the particle triggers right now however, 3D colliders work fine with it. If you need the Box Collider 2D trigger for something else, you can do both. Have a parent Game Object with the 2D Box Collider trigger, and a child game object with a 3D Box Collider trigger for particles. I've recently run into the same problem. Sadly my use case is a bit more complicated so I can't use the Box Collider 3D solution.
Your answer
Follow this Question
Related Questions
Translate Jump Trigger Collision Issue 1 Answer
Does OnTriggerStay ignore layers? 1 Answer
How to check which colliders that collision with some object ? 3 Answers
best way to check if a Vector3 point is within any of multiple colliders 1 Answer
How to Specify a Collider in OnTriggerStay function? 1 Answer