Studies exploring associations between neighbourhood environment and obesity often overlook the fact that neighbourhoods are multi-dimensional and that the effects of one environmental exposure may be modified by another. We examine whether associations between neighbourhood density of formal physical activity (PA) facilities and body mass index (BMI) are modified by the density of neighbourhood green spaces and takeaway stores. We used cross-sectional data from the UK Biobank cohort and linked UK Biobank Urban Morphometric Platform (UKBUMP) for 345,269 urban-dwelling adults aged 40-69. We examined associations between objectively measured BMI and the number of formal PA facilities (gyms, pools, etc.) within 1km of each individual's home, testing separately for interactions with the number of local public green spaces, and number of takeaway stores, within the same 1km buffers. We estimated modifier-stratified associations using multivariable, multilevel models to account for a clustered sampling design and potential confounding. Likelihood ratio tests were used to assess statistical interaction. We found that the association between a greater number of local PA facilities and lower BMI was stronger among people with fewer urban green spaces in their neighbourhood than among those with more green spaces (Pinteraction=0.021). The same relationship between PA facilities and BMI was also noticeably attenuated among those with more takeaway stores near home, compared with people with none (Pinteraction=0.014). We conclude that formal PA facilities may buffer against a lack of informal, green resources for PA in areas where the latter are scarce. However, the potential benefits of formal PA facilities in terms of obesity risk may be undermined by an unhealthy food environment close to home. Locating formal PA facilities in places with fewer public green resources and reducing the prevalence of takeaway stores in areas with formal PA resources may maximise the health benefits to be derived from these neighbourhood resources.