PDA

View Full Version : rotation driving particle emission


pbarnes
08-13-2008, 08:27 PM
i want a emitter to emit a single particle which is instanced when the rotation og a piece of geometry is a multiple of 90
so in one rotation 4 emissions occur.

how do i do this

i have tried entering an expression by right clicking on rate and entering

bulletEmitter.rate = (frontGunGroup.rotateZ % 90) ? 0 : 25;
//code to make emit on 90 degree intervals
but it still emits when rotate value of 0, how can i exclude this value
0/90 = 0

i also tried adding another condition so it was
bulletEmitter.rate = (frontGunGroup.rotateZ % 90) && (frontGunGroup.Amount >= 1) ? 0 : 25;
but it didnt work
cheers

pbarnes
08-14-2008, 12:45 AM
SOLVED

used maths to work out rate based on speed of rotation rather that using mod when multiple of angle

CGTalk Moderation
08-14-2008, 12:45 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.