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 southern Cameroon and 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 preferred them 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 behavior. These results provide evidence of a possible feedback loop between rainforest vegetation structure and seed dispersal by animals.