avillabon
04-27-2010, 03:59 PM
I created an nparticle emitter for debris pieces which i have instanced. What i would like to set is for the value of rotPP to be proportional to the particle's speed, meaning that when the particle's velocity is 0 then rotPP will equal 0 as well.
So far I only have a couple of expressions attached to this particle system.
Creation Expressions:
Index (to controls the instancers' geo)
rotPP (emits particles at a random rotation position)
Debris_nParticleShape1.index = Debris_nParticleShape1.particleId%15;
Debris_nParticleShape1.rotPP = rand (0,360);
Runtime Expressions: (whic are the ones giving me a hard time)
float $vel = (Debris_nParticleShape1.velocity)/2000;
Debris_nParticleShape1.rotPP += $vel;
For some reason this isnt giving me any rotation while the particles are in flight which is the one thing i need right now.
I'll attach the scene so you can better see what is going on..
Thanks!
Alex
So far I only have a couple of expressions attached to this particle system.
Creation Expressions:
Index (to controls the instancers' geo)
rotPP (emits particles at a random rotation position)
Debris_nParticleShape1.index = Debris_nParticleShape1.particleId%15;
Debris_nParticleShape1.rotPP = rand (0,360);
Runtime Expressions: (whic are the ones giving me a hard time)
float $vel = (Debris_nParticleShape1.velocity)/2000;
Debris_nParticleShape1.rotPP += $vel;
For some reason this isnt giving me any rotation while the particles are in flight which is the one thing i need right now.
I'll attach the scene so you can better see what is going on..
Thanks!
Alex
