Search Unity

Question Particle system not using the "sliced" section of a multiple sprite sheet during collisions

Discussion in 'General Graphics' started by PixelPockets, Jun 4, 2022.

  1. PixelPockets

    PixelPockets

    Joined:
    Sep 7, 2020
    Posts:
    143
    I have a particle system set up with the texture sheet animation mode set to "grid".

    It's using all of the sprites on the sheet, but when it comes time for collision, it's using the entire frame, instead of the specific sliced areas that I set in the sprite editor. Is this normal with collisions, or is there a way I can have it use only the sliced areas for collisions?

    I'm finding that when you have multiple sprites with different sizes, I have to set up multiple particle systems just to get all the specific sprites I need, and that seems.. wasteful.

    Is there anything I can do to get multiple sprites to work with a single particle system, or am I doomed to create multiple systems in order to get all the sprites I need?
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Particles use a sphere for the collider shape. You can show the shape used for collisions by enabling a debug option in the collision module.

    If that shape isn’t fitted correctly around the particle, I’d say it’s a bug and please report it - however if the sphere is a reasonable fit around the particles it’s most likely not going to be able to be improved.
     
  3. PixelPockets

    PixelPockets

    Joined:
    Sep 7, 2020
    Posts:
    143
    OK, so "Visualize Bounds" is what you are referring to, I'm assuming. Also, I see that there's an option for the radius scale. I hadn't tested that yet, so thanks for the heads up!
     
    richardkettlewell likes this.
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Yes, sorry, i don't know why i didnt say the name of the option!

    And yes, radius scale lets you find the best size for the collider. This is useful if, for example, particles have a soft faded edge, or parts of their texture are completely transparent.