|
|
How do you get one animation to start another one?In this simple example we will make two animations. Animation one moves a box left and right. Animation2 moves a box up and down. Now, here is the deal... When Animation1 gets done running it starts or triggers animation2. When Animation2 gets done it triggers Animation1. This makes an endless loop of animations. You probably would code a real object to stop sometime so you don't just burn up CPU cycles, but this is just an example. I used the animation Wizard to make a box move left and right. I did it a second time to make a box move up and down. I added a touch sensor to start the whole thing moving. I added a viewpoint so the whole thing is not right in your face. Then I edit the animation properties for Animation1 and click on the Triggers tab. That takes you to a panel that looks like this where you hit the Add Trigger button. Then you move the cursor to the Scene Tree window and click the only thing you can select: Animation2 (the other things are "dimmed" or grayed out; you can not select them). If you look at the Trigger properties panel after you click in the tree window, you will see the dialogue has changed to look like this. When Animation1 Stops, the Triggered Node (Animation2) will... Start at the Beginning. OK, you now have one animation that sets off another one. To complete the loop, we will make the second animation start the first when the second one is done. Go to the Animation2 properties and click the Triggers tab. Go to the tree window and click the Animation1 icon. The dialogue changes to this... When Animation2 Stops, Animation1 will start at the beginning. Cool, huh? Here is the Flux Studio file, and here is the VRML output. |
|