Resumo: We introduce a multi-agent model for exploring how selection of neighbours determines some aspects of order and cohesion in swarms. The model algorithm states that every agents? motion seeks for an optimal distance from the nearest topological neighbour encompassed in a limited attention field. Despite the great simplicity of the implementation, varying the amplitude of the attention landscape, swarms pass from cohesive and regular structures towards fragmented and irregular configurations. Interestingly, this movement rule is an ideal candidate for implementing the selfish herd hypothesis which explains aggregation of alarmed group of social animals.