0 like 0 dislike
242 views
Can I set up particles to spawn from any point inside of a collision shape(not just on the surface), and on top of that can I prevent them from spawning inside of a different shape sampler (also acting as collision) that's inside of the first one, at the same time?
by

1 Answer

0 like 0 dislike
 
Best answer

See http://wiki.popcornfx.com/index.php/CParticleSamplerShape , you can set the SampleDimensionality to Volume so "samplePosition" will sample the Volume (does not work with Meshes).

To spawn inside, say "SpawnShape", and strictly exclude another Shape, say "ExclusionShape", you can kill particle when contained inside it, in a Spawner Script script you can:

Position = SpawnShape.samplePosition();
Life = iif(ExclusionShape.contains(Position), 0, 1); // no Life if inside ExclusionShape

In an Evolver script, you could:

kill(ExclusionShape.contains(Position));

Then use a Collisions Evolver to collide with the ExclusionShape.
http://wiki.popcornfx.com/index.php/CParticleEvolver_Collisions

Or an Attractor Evolver with negative ForceField to repulse particles.
http://wiki.popcornfx.com/index.php/CParticleEvolver_Attractor

Be careful with "kill(ExclusionShape.contains(Position));" it could kill your particles before they even collide with the Shape.

 

 

by Jordan (14.6k points)
...