Mechanistic models of community assembly state that biotic and abiotic filters constrain species establishment through selection on their functional traits. Predicting this assembly process is hampered because few studies directly incorporate environmental measurements and scale up from species to community level and because the functional traits' significance is environment dependent. We analyzed community assembly by measuring structure, environmental conditions, and species traits of secondary forests in a species-rich tropical system. We found, as hypothesized, that community structure shaped the local environment and that strong relationships existed between this environment and the traits of the most successful species of the regeneration communities. Path and multivariate analyses showed that temperature and leaf traits that regulate it were the most important factors of community differentiation. Comparisons between the trait composition of the forest's regeneration, juvenile, and adult communities showed a consistent community assembly pattern. These results allowed us to identify the major functional traits and environmental factors involved in the assembly of dry-forest communities and demonstrate that environmental filtering is a predictable and fundamental process of community assembly, even in a complex system such as a tropical forest.