- Home /
Particles in Orthographic Camera Disappearing Too Soon
Hello, I'm currently working on a particle effect that is supposed to travel behind the player when they activate a boosting ability. I have the emissionRate set to 0 so I can emit a specific number of particles as a burst in code. The particle system looks fine when I simulate it in the scene view, but when I play the game the particles just disappear after a fraction of a second (their lifetime is set to a random value between 2 and 3 seconds). I've noticed some very peculiar facets to this behavior.
First this only appears to happen when the cone is pointed to the left or right relative to the camera (270 or 90 degrees on the Y axis). If the cone is pointed toward or away from the camera the particles will die at the appropriate time. As it rotates from the side to the front the particles last increasingly longer.
If I activate the boost ability again immediately, more particles are emitted and the old particles that disappeared are now visible again and appear to have been simulating the entire time, but were just not visible. After the same amount of time all the particles will become invisible again.
If I change the orthographic camera's size so it is larger (making everything on camera smaller) then the particles live longer before they are killed prematurely. If I make the camera perspective then there is no abnormal behavior with the particles at all.
If I turn up the emissionRate to around 10 then the burst particles stay alive as long as they should. This is not ideal, though, as I want just the burst particles and not a steady stream.
I tried playing around with the clipping plane on the camera but with no success. Even when the particles are clearly within the clipping plane they still disappear early.
Has anyone else noticed strange behavior with the particle system and orthographic cameras? Any ideas on how to address this issue would be amazing.
For reference I am running Unity Version 4.3.3f1 (c8ca9b6b9936)
I think I'm seeing the same thing, particles render in the scene viewer and in a perspective camera, but not in an orthographic camera. Did you ever find a solution?
Answer by atr0phy · Mar 28, 2015 at 11:51 AM
You have to remember that the particles are moving along all 3 axis, regardless of your camera. Movement on the Z-axis is going to lead to odd behavior like you describe. Locking the Z-axis is what worked for me when I had this issue.
For example, set the following in your particle system:
Limit Velocity over Lifetime > Separate Axis = true > X/Y-axis = 9999 (since i didn't want to dampen those axes) > Z-axis = 0