Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Bug? Shuriken mesh-emitter Scale problem after upgrading to Unity 4

Discussion in 'Editor & General Support' started by dasbin, Jan 26, 2013.

  1. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    I just upgraded to Unity 4 from 3.5.
    I have many particle effects that use custom mesh emitter shapes. Some of these are Game Objects which are children of other objects. Suddenly, child particle effects which use meshes are being stretched to match the relative size of their parents. In other words, if the size of the parent is 1, 4, 1, then the absolute size of the child's emission mesh will be 1, 4, 1 as well.

    In 3.5, the absolute size (world scale) was always 1,1,1 and unchangable, even by the parent's Transform.

    I understand that it is now closer to how most other object Transforms behave, but the problem is that the "Scale" controls of their Transform remains greyed out and locked at 1,1,1 (local scale), so it is impossible for me to fix this in the inspector at build time (and the parent's scale often changes during runtime anyway). The world scale is now fixed to the parent's scale. Even if I could maybe fix it via transform.localScale, it would be very computationally expensive to try to calculate a relative size to get and set lossy world scale every single frame.

    What's going on here? Why on earth would this behaviour be intentionally changed for the worse and then not documented? This seems like a bug, but I'm not sure. Is there are a way to turn this behaviour off? If not, I'm going back to 3.5 - it's just way too much work and too performance-expensive to completely de-parent all our particle systems and position them manually every frame (or to do lossy world scale transforms every frame like above).


    Edit: found this in the 4.01f2 changelog: "- Shuriken: Fixed emitter shape being wrong shape when parented to another game object with scale."

    But I'm running 4.01f2, so maybe this messed-up behaviour *is* the "fix." So frustrating. There were a lot of good reasons for the old way of doing it, and no particularly good ones I can think of for this way.
     
    Last edited: Jan 26, 2013
  2. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    Just a bump... I find it hard to believe I'm the only one with this issue.

    I have reported it as a bug in Unity, though I expect it will likely go ignored unless we can drum up some support.

    Just checked... 4.0 behaves 'properly' (that is, the same way Unity has always behaved) and 4.01 totally changes the way emitter mesh scale works in this bad way.
     
  3. ccuser

    ccuser

    Joined:
    Oct 3, 2012
    Posts:
    2
    I'm not sure if my comment is going to be useful for you, but in my opinion this is not a bug but an intentional feature. Our project uses this feature as well, and we've been waiting for a long time for the ability to scale mesh particle emitters. So, yeah, I think that this behaviour is indeed the "fix". :)
     
  4. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    The problem is that if the emitter is parented to anything with a scale change, it is just about impossible to eek a 1,1,1 worldscale out of the emitter. That doesn't sound like a feature to me.
     
    Last edited: Feb 16, 2013