| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi to everyone, I'm a newbie at VRML and probably what I'm asking may be easy for you... I've created a virtual museum, with paintings etc etc. What I'd like to do now is to offer a virtual tour to a room. The position and orientation interpolators are set, anw what I need is to pause the animation infront of a painting and afterwards using a mouse click or a key to continue the animation. Here is the code (which of course doesn't work.....): #VRML V2.0 utf8 WorldInfo { title "Best_Museum" info "by Kostas et al." } DEF Camera01 Viewpoint { position -208.9 94.12 546.4 orientation 0.005882 -1 -0.005613 -1.524 fieldOfView 1.188 description "Camera01" } DEF Camera01-TIMER TimeSensor { loop FALSE cycleInterval 41.67 }, DEF Camera01-POS-INTERP PositionInterpolator { key [0, 0.0024, 0.0048,..... ] }, DEF Camera01-ROT-INTERP OrientationInterpolator { key [0, 0.0024, ...., ] }, DEF pause Script { eventIn SFFloat inplace eventOut SFBool timecont url ["javascript: function inplace (fraktion) { if (fraktion == 0.1008) { timecont=FALSE; } else { timecont=TRUE; } }", ] } ROUTE Camera01-TIMER.fraction_changed TO pause.inplace ROUTE pause.timecont TO Camera01-TIMER.enabled ROUTE Camera01-TIMER.fraction_changed TO Camera01-POS- INTERP.set_fraction ROUTE Camera01-POS-INTERP.value_changed TO Camera01.set_position ROUTE Camera01-TIMER.fraction_changed TO Camera01-ROT- INTERP.set_fraction ROUTE Camera01-ROT-INTERP.value_changed TO Camera01.set_orientation any ideas how to implement this? Thank you in advance for your time Kostas |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.