Researchers have long noted that individuals occupy consistent spatial positions within animal groups. However, an individual's position depends not only on its own behaviour, but also on the behaviour of others. Theoretical models of collective motion suggest that global patterns of spatial assortment can arise from individual variation in local interaction rules. However, this prediction remains untested. Using high-resolution GPS tracking of members of a wild baboon troop, we identify consistent inter-individual differences in within-group spatial positioning. We then apply an algorithm that identifies what number of conspecific group members best predicts the future location of each individual (we call this the individual's neighbourhood size) while the troop is moving. We find clear variation in the most predictive neighbourhood size, and this variation relates to individuals' propensity to be found near the centre of their group. Using simulations, we show that having different neighbourhood sizes is a simple candidate mechanism capable of linking variation in local individual interaction rules-in this case how many conspecifics an individual interacts with-to global patterns of spatial organization, consistent with the patterns we observe in wild primates and a range of other organisms.