#VRML V2.0 utf8 Group { children [ Transform { translation -2 0 0 children [ Shape { # création d'un cylinder pour matérialiser la cylindre invisible du cylinderSensor appearance Appearance { material Material { diffuseColor 1 0 0 } } geometry Cylinder {} } DEF SpCylinder CylinderSensor {} ] } # Creation d'un cube sous un noeud Transform # Afin de pouvoir controler sa rotation DEF cube Transform { translation 2 0 0 children Shape { appearance Appearance { material Material { diffuseColor 0 0 1 } } geometry Box {} } } ] } # Copie de l'angle de rotation issu du cylinderSensor sur l'angle de rotation du cube. ROUTE SpCylinder.rotation_changed TO cube.set_rotation