Search Unity

Unity Particle System Glitches Out.

Discussion in '2D' started by whizzeschnitzel07, Oct 29, 2022.

  1. whizzeschnitzel07

    whizzeschnitzel07

    Joined:
    Apr 19, 2022
    Posts:
    1
    So whenever I play the animation myself it works just fine but whenever my code plays the animation, the animation spazzes out at the end and it looks horrible. Here's what I mean
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,491
    Whilst you've tagged this as both 2D and 2D physics, I'm not sure what this has to do with either? You're not even using the collisions feature of the particle system. Maybe you could explain.

    The particle system isn't a 2D feature (certainly not a 2D physics feature) but if you add a "particles" tag to your post then you'll likely get a friendly particle dev turning up so I'll do that for you. :)
     
  3. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,698
    Am very vaguely remembering to have encountered that at some point, but have no clue at all anymore what caused or fixed it.

    However, in cases like those where a non-code component (and sometimes even code components aka scripts) inexplicably bugs out reproducibly, there's usually one reliable way to solve it:
    Re-create the component step by step until either the problem occurs or you have the desired end result. Aka start with the default particle system and attach it to your code. If that one runs smoothly, then start transferring the settings one after another until the issue reappears and then you know what caused it.