1 | DEF Action1 Script { |
2 | eventIn SFFloat clicked |
3 | eventOut SFVec3f set_position |
4 | url "vrmlscript: // Note: Cosmo Player 2.0 still wants to see vrmlscript |
5 | function clicked(time) |
6 | { set_position[0] = 1.0+time*1; |
7 | set_position[1] = Math.sin(time*6.28); |
8 | set_position[2] = 0.0; |
9 | }" |
10 | } |
11 | ROUTE GO.touchTime TO TIME1.startTime |
12 | ROUTE TIME1.fraction_changed TO Action1.clicked |
13 | ROUTE Action1.set_position TO T1.set_translation |