Two Animations
Sculpted Surface? ] Sculpted Tubular ] Sculpted Complex ] Lamp ] Lighting ] Spotlight ] Midi Media ] IFS Edit ] IFS_SOI ] Texture Coords ] Animations ] Animation Chat ] [ Two Animations ] Door ] Gestures ] Complex Avatar ] Heads ] Proximity Sensor ] Proximity VP unbind ] Switch Node ] Guided Tour ] Beam Slowly ] Stairs? ] Walk ] Duck Shoot ] Navigation Box ] URNs in URLs ] Play a mp3? ]

 

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.

two_anis_prop.jpg (28243 bytes)

That takes you to a panel that looks like this where you hit the Add Trigger button.

two_anis_add_trig1.jpg (22487 bytes)

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).

two_anis_add_trig_tree.jpg (7854 bytes)

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.

two_anis_add_trig2.jpg (23188 bytes)

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.

two_anis_add_trig3.jpg (24192 bytes)

Go to the tree window and click the Animation1 icon.

two_anis_add_trig_tree2.jpg (11223 bytes)

The dialogue changes to this...

two_anis_add_trig4.jpg (26019 bytes)

When Animation2 Stops, Animation1 will start at the beginning.

Cool, huh?

Here is the Flux Studio file, and here is the VRML output.

 

Back ] Home ] Up ] Next ]