The space around us influences our cognitive performance. There are more and more guidelines on how to design the space around us to improve cognitive abilities. The context of university classrooms is often taken as the context of studies. Since classrooms of this type can be especially large, a question still arises: does distance to the blackboard influence student performance? This was the objective of the present study: to study the effect of the students' distance to the blackboard on their cognitive performance; specifically, on attention and memory. For this purpose, a field study was conducted using virtual reality. 75 university students carried out performance tests in attention (reaction time to auditory stimuli) and memory (remembering an auditory list of words) while immersed in two photorealistic virtual classrooms replicating physical ones. This was repeated in three different design situations: X m, X+0.6 m, and X+1.2 m; X being the distance to the blackboard of the second row of seats in the original design. Analyses indicate that the distance to the blackboard significantly affects attention (but not memory) performance: as the distance decreases, attention performance increases. Results may be of interest for designers involved with these spaces, for educators interested in improving the cognitive abilities of their students by modifying the dynamics of their classes, and for researchers involved in how space can affect cognitive processes.