-
Set random value + keyframes
It’s been a while since I’ve worked with keyframes, so I’m having a bit of trouble nailing this one down.
I’ve got an object in 3D space. X and Z coords are fine and shouldn’t change from their set value.
For the Y value, I want it to be assigned a random number (between, say, -100 and -200) only once, at the beginning. Then it needs to go up to 0 over the course of 20 frames. I’d also like to set the frame that it starts that transition on as a random frame between 0 and 10.
I’ve got some jumbled up code that I’ve been working on, but I don’t believe it’s worth posting. The part I’m having the issue with is the going up to 0 over the course of 20 frames, and getting the random values to only change once instead of once every frame.
Edit: Actually, here’s some code:
seedRandom(30,true);posY = random(-85, -385);
startFrame = Math.floor(random(0,10));
endFrame = startFrame+20;[value[0], posY, value[2]]