In the Photoshop gradient settings there's an option 'Align with layer', and when you leave it unchecked the effect is that the gradient takes up the whole canvas and you can move your object 'over' the gradient, like in the GIF below. I am wondering how to achieve this effect in Illustrator?
I've tried using the gradient tool and applying it to multiple objects, but so far the gradient just 'sticks' to each one and moving the object doesn't affect the gradient part that is showing. I don't want to be moving the gradient itself.
Thank you!