Four Rectangles each with a TouchSensor. The output from each TouchSensor's isOver is routed to the Material2D filled of the Rectangle that it is acting as a touch sensor to. So each rectangle will change from an outline to filled when the mouse (input device) is hovered over it. In addition the filled of Rectangle B (i.e the filled in its Material2D) is routed to the filled of A. Hover over A and only A changes. Hover over B and both B and A change.
Now the routing loop. Rectangle C filled is routed to Rectangle D filled. And Rectangle D filled is routed to Rectangle C filled. This forms a loop. Hover over either C or D and they both change. This loop should not cause a stack exception or other problem but must be handled according to ISO/IEC 14772-1 subclause 4.10.4.
Snapshot of rendered output.
![]() |
Snapshot of rendered output with input device (mouse) over C or D
![]() |