Using a mesh as a mask for another mesh

Hi everyone,

I wish to hide a part of a mesh. And that hidden part may change during the game. A bit like a hole in a wall that would move around (and allow to see what is behind).
I was thinking that there may be a way to use a mesh A as mask for an other mesh B. Mesh A would be hidden and mesh B only hidden when mesh A is before it. But I didn’t find a way to do this.

Any idea or vague hint ?

Hi, did you find any way to do this?