Three-dimensional (3D) vegetation structure influences animal movements and, consequently, ecosystem functions. Animals disperse the seeds of 60%-90% of trees in tropical rainforests, which are among the most structurally complex ecosystems on Earth. Here, we investigated how 3D rainforest structure influences the movements of large, frugivorous birds and resulting spatial patterns of seed dispersal. We GPS-tracked white-thighed (Bycanistes albotibialis) and black-casqued hornbills (Ceratogymna atrata) in a study area surveyed by light detection and ranging (LiDAR) in southern Cameroon. We found that both species preferred areas of greater canopy height and white-thighed hornbill preferred areas of greater vertical complexity. In addition, 33% of the hornbills preferred areas close to canopy gaps, while 16.7% and 27.8% avoided large and small gaps, respectively. White-thighed hornbills avoided swamp habitats, while black-casqued increased their preference for swamps during the hottest temperatures. We mapped spatial probabilities of seed dispersal by hornbills, showing that 3D structural attributes shape this ecological process by influencing hornbill behaviour. These results provide evidence of a possible feedback loop between rainforest vegetation structure and seed dispersal by animals. Interactions between seed dispersers and vegetation structure described here are essential for understanding ecosystem functions in tropical rainforests and critical for predicting how rainforests respond to anthropogenic impacts.