This project is read-only.

Particles using code

Aug 3, 2009 at 9:16 PM

Is it possible to create particles directly through code?

That can become useful if you do not know how it will behave. I'm thinking for instance on sparkles that would appear on collision with other objects, say in a shooter game, bullet. :)

Aug 7, 2009 at 9:50 AM
Edited Aug 7, 2009 at 9:51 AM

When you create a particle with a trigger or toggle, you can specify all the starting values used (position, rotation, velocity, colour, etc). However there isn't any way to change their logic at runtime, as this is mostly controlled on the GPU with compiled shaders.

The 'bursts' effect in tut 23 does this.

Aug 7, 2009 at 2:38 PM

Thanks StatusUnknown for these precisions.

Does it mean I cannot change the particles position over time?!

If so, I cannot use Xen's Particle system to render my different effects for instance: engines trail for my spaceships, sparkles defined by collision when the hull of my spaceships are hit by a bullet, etc...

It would also mean that Xen's particle system can only be used as scene fixed elements... or they cannot react to code base properties such as wind variations or other physics coded in our applications...