The paper investigates the role of an affective system as part of an ethologically-inspired action-selection mechanism for virtual animals in a 3D interactive graphics environment. It discusses the integration of emotion with flocking and grazing behaviour and a mechanism for communicating emotion between animals; develops a metric for analyzing the collective behaviour of the animals and its complexity and shows that emotion reduces the complexity of behaviour and thus mediates between individual and collective behaviour.