|
Hello,
Want to write an expression (per particle) wich make no collision for each particle during its first second of life…
Can you help me ?
Alain
|
|
|
|
You can do it if you create a non-colliding particle that dies when it has reached a certain age and then emits another particle from the same position and with the same velocity.
Here’s a run-time expression that does that:
if (particleShape1.age >= 1.0 ) {
float $pos[] = particleShape1.position;
float $vel[] = particleShape1.velocity;
print $pos;
// kill the particle
particleShape1.lifespanPP = 0;
// emit the new particle
emit -object particle2 -position $pos[0] $pos[1] $pos[2] -attribute velocity -vectorValue $vel[0] $vel[1] $vel[2]; }
You’ll need to create a single particle so you have something to emit, and you also need to have the lifespan set to use lifespanPP.
Attachments seem to be broken again. Email me if you need an example michiel(at)thnkr.com
|
|
|
|
Very great idea !
Thank you very much Michiel
Alain
|
|
|
|
It works...but very slow....:-(
But, you give me THE IDEA :
This works much better :
Make the Trace Depth = 0 for the particle system, and write this :
if (particleShape1.age < 1)
{
particleShape1.traceDepthPP = 0;
}
else
{
particleShape1.traceDepthPP = 10;
}
Very good solution !!!
Thanks again, I found the solution with your help (for the use of particleShape1.age)
Alain
|
|
|