Search code examples
c#unity-game-engineparticle-system

Particle System change rendering display for unknown reason


I have prefab in which has these components attached to it: Transform, Particle System and Spell(Script). So that is whole prefab. I called it when player come close to object with this attached to the 'object':

void OnTriggerEnter(Collider col)
{
    if(col.tag == "Player")
    {               
        GameObject test;
        GetComponent<CastSpell>().castSpell(100000.0f, out test);
        test.transform.LookAt(col.transform);
    }
}

So it creates spell at perfect position (object/monster position) so it look like that monster is doing it. 100000.0f is number of seconds it stays there before destroyed and it should be something like 0.5f or less but for test purpose i set it long. So problem is when i am watching that particle system it is ok, but when i start moving particle system start changing, i guess, rotation (but in inspector nothing is changing). So here is the image of how it looks:

Particle system in next images is zoomed and a lot bigger so you can see what is happening:

When i stay it looks like this: Idle

When i go backwards: Back

To the right: Right

Forward: Forward

I think there is not anything else that is connected to particle system so i guess it is something about setting it up but as much as i try i couldn't find what it is.


Solution

  • Solution was to set Particle System/Renderer/Camera Scale to 0. I couldn't find exact documentation for it.