How to use ParticleSystemTrigger in 2DParticleSystem?

Oct 16, 2009 at 10:01 AM


I tried to use ParticleSystemTrigger with ParticleDrawer2DElement.

Particle was showed well. but does not work Firetrigger with "position".

I tried to use method "Firetrigger(position)", but with any position value, always particles was shown (0, 0) (left-bottom).

I want ParticleSystemTrigger with 2D Particles.

If possible, please tell me how to.


Oct 16, 2009 at 10:07 AM

Are you setting the position in the 'once' shader logic? Also, do you have GPU position buffering enabled or disabled? (it's possible this might be causing issues)

If that doesn't, I'll need to have a look to figure out what it is that's going wrong. It certainly works fine in tut 23.

Oct 16, 2009 at 10:53 AM

I'm sorry, It's perfectly my miss.

I missed that <set target="velocity.x" arg0="0"/> to <set target="position.x" arg0="0"/>.

ParticleSystem works perfectly. Thanks.

Oct 16, 2009 at 11:21 AM

And, I have another question.

In <once>, position.x, y, z is world position of particle,

and in <frame>, position.x, y, z is local position of particle .

( for example, <if_less arg0="position.y" arg1="0"> in Burst.particles in tutorial. the particle was bounded at particle's position, not at world position.y = 0)

Is this true?

Oct 16, 2009 at 12:01 PM
Edited Oct 16, 2009 at 12:59 PM

If you set the gpu buffer position flag to true, then for gpu particles, the position will be local.

Basically, after once, the starting position is stored in user values 1-4, and the position is zeroed. This way you can get good local precision on the position (which is 16bit float).

The other option, is to draw the entire instance in a different position. So you actually start the particles at zero, but draw the system at the centre position.
But yes, either way it makes it tricky to compare the position to constant values. You would probably need to use global values for this, in combination with the second option (drawing the system at a set position). With gpu buffering disabled.

It's a tricky thing as you can't use FP32 on the xbox. Also, Gpu buffering is usually only needed for 3D particles.

Oct 16, 2009 at 12:09 PM

oh! I understand. thank you for your Reply.