Skip to main content

How to wait for alpha to finish before starting the next stage of animation?

No replies
fuggimator
Offline
Joined: 2011-07-08
Points: 0

Hello,

I am working on a program that displays a random walk in 3D space. Currently the program generates a random path, displays it, and lets you navigate within it. It looks something like this: http://imgur.com/i4jga

I want to change it so that it animates the path as it generates it. Each step in the path is visualized by a Box, and I wrote a custom interpolator that will stretch the Box between any two given points. Now when I run the program with the interpolators attached, it plots out the whole path and then animates each piece at the same time, rather than one after the other. This looks something like this: http://imgur.com/VCgrJ . That was taken with a fairly high alpha value, and when alpha reaches 1, the paths all join up.

So my question is, how do I make the program wait for the first Alpha to finish before it calculates the next step? In other words, I want it to work like:

Calculate first step
Use the interpolator to animate the first step
Calculate second step
Use the interpolator to animate the second step,
etc.

Can anyone shine some light on this problem?

Thanks,
Jeff