I am learning how to use expressions. What numbers would the following code return at say time=4 seconds.
life = 1.2; //life of particle
seedRandom(1,true);
delay = random(life);
if(time < delay){
age = 0;
seed = 0;
}else{
age = (time - delay)%life;
seed = Math.floor((time - delay)/life) + 3;
}
[seed,age]
Learning expressions
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
Well for me, at 4 seconds it returns an array of two values [5, 1.1]. The expression above will only work on a 2 dimensional property such as position or scale.
But I'm not sure what you're really asking. Is there something you want to do, but need help writing the correct expression?
Paul T
But I'm not sure what you're really asking. Is there something you want to do, but need help writing the correct expression?
Paul T