(a) Side view of a mouse in the tactile virtual reality system. (b) Schematic illustrating closed-loop control of the walls. If the mouse runs at speed v in the direction ϕ in a corridor with a turn angle ψ then wall position u updates according to the coupling equation Δu = γ v sin(ε) Δt where ε = ϕ − ψ the difference, or error, between the run angle and the turn angle, is the gain, and Δt is the time interval. (c) One-left-turn trial. The mouse trajectory (pink) is overlaid on the ideal trajectory (gray), which corresponds to staying in the center of the corridor. The angle error is the difference between the actual and ideal trajectories at the end of the turn. (d) Top, twenty randomly selected running trajectories corresponding to three different turn angles recorded in one session. Bottom, same as above during barrel cortex photoinhibition achieved by photostimulating GABAergic neurons expressing ChR2 (left, pink; straight, gray; right, purple). (e) Average angle error during interleaved trials with no photoinhibition, visual cortex photoinhibition, barrel cortex photoinhibition, and trials with no whiskers. Barrel cortex photoinhibition impaired tracking performance (p = 6.4*10–4 t-test; 8 mice).