View Full Version : klling particles and collision event

11 November 2009, 07:38 PM

This is what I am trying o do
I have an emitter which collide with 2 different objects. I'd like the particles to die when they hit one object but live when they hit the other object.
I cannot figure out how to write the expression or set an event for this. Tried everything I could think of but nothing work propely.
Can someone help me?

11 November 2009, 09:32 PM
select the particles and in the attribute editor under "Add Dynamic Attributes" click "general". then go to the particle tab and add the attribute called "collisionGeometryIndex". now each collision geo will return a unique index number upon collision.

set you particle lifespan mode to lifespanPP only and in the runtime add something like this:

if (particleShape1.collisionGeometryIndex == 1){
particleShape1.lifespanPP = 0;

Hope this helps

CGTalk Moderation
11 November 2009, 09:32 PM
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.