Control of attention and gaze in complex environments