- Home /
Question by
fghjru · Jun 23, 2013 at 07:12 AM ·
particle systemsphere
Generation of a particle system inside the sphere
How to implement the appearance of all the particles exactly in the sphere? The particles with the appearance of the Particle Emitter can travel unequal distances from the center. You can decreased some options in Particle Emitter, that they will not slide so far, but this will not be powerful enough to generate the entire volume. If you add World Particle Collider, Unfortunately, the particles can not collide with the Sphere Collider inside this collider, only outside. If i add script to particle system, FPS drops sharply.
void LateUpdate ()
{
Particle[] particles = particleEmitter.particles;
for(int i = 0; i < particles.Length; i++)
{
if(Vector3.Distance( particles[i].position, gameObject.transform.position) > 80)
{
Debug.Log ("destr");
particles[i].size = 0;
}
}
particleEmitter.particles = particles;
}
Comment