Random Twist for Sprite Particles


#1

So I know that I need to go to the Per Particle Array Attributes and then Add the Sprite Twist PP in the Dynamic attributes, but what do I do then?

Thanks for any help guys :slight_smile:


#2

then you write particle expression on the twist:

creation expresion example for random twist:
yourParticleShape.twistPP = rand(360);


#3

Cool thanks… I thought there might have been just a window with a random value or something. Didn’t know you had to know how to write expressions.

If I want them to rotate over their lifespan how would you do that?


#4

create new float particle array attribute say rand_multPP
then on particle creation assign random values to it to get clockwise and counterclokwise spin, this will determine also the speed of rotation.

rand_multPP=rand(-1,1);

then switch to runtime and add the value from rand_multPP to the twist value this will happen each frame:

yourPShape.twistPP+=rand_multPP;

if you need them to spin faster increase the range
rand_multPP=rand(-10,10);


#5

Thanks so much for your help :slight_smile:


#6

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.