Search Unity

Individual particles get scaled when using Mesh Renderer shape?

Discussion in 'General Graphics' started by dgoyette, Nov 23, 2018.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    This might be hard to describe, so I have some pictures. The issue is that if I use a Mesh Renderer to control the Shape of a particle system, scaling the Mesh Renderer causes the particles themselves to be scaled. I'd like to avoid that. I want it to work the same way that using a Box shape, and scaling the box, works.

    Here's the particle system using a Box shape:
    upload_2018-11-23_11-15-24.png

    And now, if I scale the box, the particles spread out to fill the volume. Note that the particles are just spread out, they aren't scaled at all.

    upload_2018-11-23_11-16-19.png

    Looks good. Now, I change it to use a Mesh Renderer for my shape instead. In this case, just a Unity cube:

    upload_2018-11-23_11-17-35.png

    But now if I scale the cube, it scales the particles themselves. Notice how the lightning is all stretched.

    upload_2018-11-23_11-18-9.png

    I don't want that to happen. I just want the scaled mesh renderer to control where the particles spawn, the same way it does with the Box shape. Is there a way to get the particle system not to scale particles?
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Actually, just one question: are you using the scale in the shape module, or the Transform component scale?

    You should use the shape module scale :)

    So maybe not a bug...
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I'm scaling the transform of the object that contains the Mesh Renderer. The idea was that I wanted to be able to scale the mesh arbitrarily, and have the particles continue to spawn on the surface of the mesh. But this also scales the particles. Sounds like that's expected behavior then?
     
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Yeah sorry it is. For most shapes you can set the scaling mode in the main settings to shape, but for meshrenderer it locks to hierarchy mode, which applies the scale in the way you are seeing.

    I’m not sure if we could make this more flexible..
     
    dgoyette likes this.
  6. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Thanks for clearing it up, and that I wasn't doing something wrong at least. I've changed my approach to one of the other shapes that allows me to set the scaling mode.
     
    richardkettlewell likes this.