- Home /
Unculled particle system rendering
Hi,
I have a particle system emits particle in a wide area. The problem is, if the center of the particle system is not in the camera, I couldn't see any of the emitted particles.
Is there anyway for me to force unity to keep rendering the particles on camera?
For my project, I want to be able to zoom in to any particle without viewing its center.
Thanks in advance.
Comment
Answer by tsabobo · Aug 12, 2015 at 10:09 AM
// create your particle system with world space
particleSystem = gameObject.AddComponent<ParticleSystem>();
particleSystem.simulationSpace = ParticleSystemSimulationSpace.World;
in your Update():
// make sure particle is always in front of camera
gameObject.transform.position = Camera.main.transform.TransformPoint(Vector3.forward*10);