#VRML V2.0 utf8 # Ici, on crée un groupe avec une sphere # et un touchSensor Group { children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Sphere { } } Sound { source DEF Click AudioClip { url "click.wav" stopTime 1 } minFront 1000 maxFront 1000 minBack 1000 maxBack 1000 } DEF TS TouchSensor { } ] ROUTE TS.touchTime TO Click.startTime } # On ferme le groupe et on crée un cube # le Cube n'appartient pas au groupe dans lequel # se trouve le touchSensor # Il n'est donc pas cliquable. Transform { translation 4 0 0 children Shape { appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Box { size 2 2 2} } }