0 like 0 dislike
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?

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:


Then use a Collisions Evolver to collide with the ExclusionShape.

Or an Attractor Evolver with negative ForceField to repulse particles.

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



by Jordan (14.6k points)