Collisions between Particles and SpriteRenderer not working

I was able to make particles collide with meshes in my scene setting the Collision type to “world” on the Particle System.

Now I have a SpriteRenderer (imported with Generate Physics Shape enabled) and a MeshCollider, but I can’t get the particles to interact with it. I also tried to generate a “custom physic shape” from the Sprite Editor, with no luck.

Any idea on what is going wrong here?

I haven’t really got any tips based on the info you’ve provided, but, i can tell you that it is definitely possible to have particles collide with a sprite. (we have tests internally that use this behaviour)

EDIT: thought of one: are the sprite colliders set as Triggers? That would stop them colliding, I think.

Hi Richard, the MeshCollider on the Sprite is not set as Trigger (otherwise it would not work, as you say).
I tried also to rotate the sprite in case the normal was facing in the wrong direction, and tried different types of collider, but no way, won’t work.

Strange thing: I can’t see the green outline of a typical mesh collider.

I made one step further:
Looks like the Sprite requires PolygonCollider2D to be attached (and not a MeshRenderer) and requires Physics2D .Raycast to perform a Raycast even if my game is 3D. Now at least I can touch/select the Sprite.

Still the Particle System’s Collision are ignoring the sprite, it works just fine with MeshColliders. Is there an option to include also 2D collision on the Particle system?

In the Particle System’s collision module you can select whether you want to collision detection to work in 2D or 3D.

Oh I see, It wasn’t visible because meanwhile I switched over to “Planes” mode for some testings. Now I can see collision to happen with the Sprite.

I there a way to have particles collide with both Meshes and Sprites at the same time, on the Same Particle System? I thought that Sprites were actually meshes…

Moreover my sprites are animated with Rigs and I see the mesh does not follow the Deformation, nor it follows the object rotation around the X axis (because it supposes its a 2D object)

To achieve what I need, do I need to switch away from SpriteRenderer and have meshes with Blend Shapes created externally in a modelling tool?

Thank you!

A 2D collider won’t work with the 3D physics engine. But you can place a 3D collider on a gameObject with a sprite renderer and have the particle system work in 3D mode.

True, but how can I shape the 3D Collider in order to be the same of the Sprite? That’s something not working out of the box like for a MeshCollider and a Mesh.

Yeah that’s not possible. You would have to manually create a collider for the sprite. Although you can add multiple colliders to a gameObject and so it may be possible to have a few simple primitive colliders roughly match the shape of your sprite.

Thank you for confirming this. It helped a lot to make things more clear.