For most primates living in tropical forests, food resources occur in patchworks of different habitats that vary seasonally in quality and quantity. Efficient navigation (i.e., spatial memory-based orientation) towards profitable food patches should enhance their foraging success. The mechanisms underpinning primate navigating ability remain nonetheless mostly unknown. Using GPS long-term tracking (596 days) of one group of wild western lowland gorillas (Gorilla gorilla gorilla), we investigated their ability to navigate at long distances, and tested for how the sun was used to navigate at any scale by improving landmark visibility and/or by acting as a compass. Long episodic movements ending at a distant swamp, a unique place in the home range where gorillas could find mineral-rich aquatic plants, were straighter and faster than their everyday foraging movements relying on spatial memory. This suggests intentional targeting of the swamp based on long-distance navigation skills, which can thus be efficient over a couple of kilometres. Interestingly, for both long-distance movements towards the swamp and everyday foraging movements, gorillas moved straighter under sunlight conditions even under a dense vegetation cover. By contrast, movement straightness was not markedly different when the sun elevation was low (the sun azimuth then being potentially usable as a compass) or high (so providing no directional information) and the sky was clear or overcast. This suggests that gorillas navigate their home range by relying on visual place recognition but do not use the sun azimuth as a compass. Like humans, who rely heavily on vision to navigate, gorillas should benefit from better lighting to help them identify landmarks as they move through shady forests. This study uncovers a neglected aspect of primate navigation. Spatial memory and vision might have played an important role in the evolutionary success of diurnal primate lineages.