Kevin Todd Knowles wrote: > > Question: url change in ImageTexture node > I am looking for some help. I am trying to accomplish this result. > > An example: > There is a vrml V2.0 scene with a texture mapped object, a box. > I want to be able to use a touch sensor on the box, when the box is > clicked on I want the texture map to change. By repeatedly clicking on > the box cycle through say 10 or so possible texture maps. With each > click on the box replacing the current texture on it and rendering the > next texture map in the list of 10. After reaching the end of the list > it automatically repeats. > > Quote from the VRML 2.0 Source book (second edition) > Page 308 second paragraph > "The URL list can be changed by sending a value to the implied set_url > eventIn of the url exposed field. When a value is received by this > input, the field value is changed, and the new value is output using the > implied url_changed eventOut of the exposed field." > > But then there is no example. > > I have been trying to figure out how to write a route from a touch > sensor to > the url field of an ImageTexture node. But I can't figure out how this > works > because of the different data types. You will need a script here. Use javascript for this, it is largely enough, you do not need java. However, I experienced some problems doing this especially on the PC, and found more practical to change directly the texturing node. Also, one of the advantages here, is that it should load before you change the values. ------------------------------------------------------------------- *** Please send administrative requests to <majordomo@sdsc.edu> *** -------------------------------------------------------------------