Strob
02-27-2008, 02:16 PM
Hi,
I'm trying to get my particles (sprite) to scale over time using a ramp, but I would like at the same time to have different size for each particle but each one increasing their size smoothly over time.
I tried this:
I created 2 per particles attributes
gBulShape.myRand and gBulShape.myRamp
in creation:
gBulShape.spriteScaleYPP = gBulShape.myRand * gBulShape.myRamp;
gBulShape.myRand = rand(.7,2.8);
gBulShape.spriteScaleXPP = gBulShape.spriteScaleYPP;
and I assigned a ramp to gBulShape.myRamp
in runtime after dynamics:
gBulShape.spriteScaleYPP = gBulShape.myRand * gBulShape.myRamp;
gBulShape.spriteScaleXPP = gBulShape.spriteScaleYPP;
But what I get with this is my particles poping their size over time. Since I put the rand in creation I thought it would be randomized only one time but at every frame it seems to be randomize in runtime.
What should I do to stop that?
Many thanks in advance!
I'm trying to get my particles (sprite) to scale over time using a ramp, but I would like at the same time to have different size for each particle but each one increasing their size smoothly over time.
I tried this:
I created 2 per particles attributes
gBulShape.myRand and gBulShape.myRamp
in creation:
gBulShape.spriteScaleYPP = gBulShape.myRand * gBulShape.myRamp;
gBulShape.myRand = rand(.7,2.8);
gBulShape.spriteScaleXPP = gBulShape.spriteScaleYPP;
and I assigned a ramp to gBulShape.myRamp
in runtime after dynamics:
gBulShape.spriteScaleYPP = gBulShape.myRand * gBulShape.myRamp;
gBulShape.spriteScaleXPP = gBulShape.spriteScaleYPP;
But what I get with this is my particles poping their size over time. Since I put the rand in creation I thought it would be randomized only one time but at every frame it seems to be randomize in runtime.
What should I do to stop that?
Many thanks in advance!
