PDA

View Full Version : nParticles Dying all at once


DKdontKNO
03-20-2010, 08:54 PM
Hi all, Having some trouble with a grid of nParticles being killed of by use of the nParticle Event editor...Basically the scene is an object emitter of nParticles pushing into a grid of nParticles that need to be killed when they leave the frame. Used the nParticle Event Editor to get the particles to be killed when they hit a collider, which works; except the whole grid of particles gets wiped out when the first collision occurs. Any help would be greatly appreciated, client is breathing down my neck!!

DDelapena
03-21-2010, 01:16 AM
The nParticles need to be killed off when when they leave the frame of the shot? Which nParticles? the grid or the ones being emitted? Try having 2 separate paricleShapes ..one being the grid, the other being the particles emitted into the grid of nParticles. Also have 2 separate collision events. That way you can separate your if condition statement to a tee and be more specific saying something like...
Lets say you have,
ParticleShapeA
ParticleShapeB
Which means you would also have
ParticleShapeA.event1
ParticleShapeB.event2
You want the nParticles named ParticleShapeA to be killed off on first collision but not ParticleShapeB

if (ParticleShapeA.event1 == 1)
ParticleShapeA.lifespanPP = 0;

Which will kill off a each specific particle that hits on first collision of that specific collision event.
Make sure you are creating a lifespanPP per particle attribute and setting the lifespan to lifespanPP or this will not work.

Is this what your trying to do? let me know if you have any questions.

CGTalk Moderation
03-21-2010, 01:16 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.