Can Layer Masks Achieve This Effect

If you look at the image below you will see the player surrounded by a dotted yellow box.

The dotted yellow box is also part of the player and represented a portion of the player being masked from both rendering and affected by physics. My question is if layer masks in Unity can achieve the following effect.

-In Area 1, the red box/animations of the player are visible and the rigidbody of this shape is affected by all Physics.

-Any portion of the player that enters Area 2 makes the larger yellow box within the area become visible (and affected by physics) and vice versa for any portion of the smaller red box that enters.

-This can persist when both entering and leaving either area from any direction.

Thank you for any help!

Okay, first the physics layers. You’ll just need two, I’ll call them “Redbox” and “Yellowbox”. You’ll set them to collide with themselves, and not each other. Then, set the red box itself and any colliders in area 1 to Redbox Layer, and the yellow box itself and any colliders in area 2 to the Yellowbox Layer.

That’s probably the easy part. Sorting Layers will be slightly more annoying. You’ve got to make that yellow box draw BEHIND the BACKGROUND in area 1. And the background in area 2 needs to be even further back. So, they can’t be the same background, you’ll have to divide it.