DEF TIME1 TimeSensor { cycleInterval 3 } |
DEF INTERP1 PositionInterpolator { |
key [ 0.0 0.25 0.5 0.75 1.0] |
keyValue [ 3.0 0.0 0.0 3.0 -.95 0.0 3.0 0.0 0.0 3.0 +.95 0.0 3.0 0.0 0.0 ] } |
DEF T1 Transform { |
children Shape { geometry Sphere{} } |
translation 3.0 0.0 0.0 } |
DEF T2 Transform { |
children [ DEF GO TouchSensor {} |
Shape { geometry Box{} }] |
translation -3.0 0.0 0.0 } |
T2 is a box and starts the action. Whenever user clicks on it, it starts the script Action1-> TimeSensor-> PositionInterpolator -> T1 |