These scripts outline the process I used to create my "World Shift" mechanic for "Swallowed Holl".
This is where the core logic is handled. This script keeps track of which world you are currently in, and shifts you accordingly based on your input. It also checks to ensure you are not "shift blocked". Once we are sure the player can shift and which world they are shifting to, we then check the main "dummies" transform. This dummy basically just mirrors the player's current position in the opposite world. If it is colliding with anything, we then move on to the "sub-dummies". The sub dummies are attached to the main dummies in 5 directions, up, forward, left, right, and back. We iterate through all 5 dummies, until we find one that is not colliding with anything. In that case, we do the shift. If none of them are shiftable, the player simply cant shift. There is also a check to ensure the player has enough hunger to shift, as resourse management was a part of this system as well.
The goal of this was essentially to give me the ability to block certain areas from being shifted into. I did this via some simple colliders, but there are still some issues with this current method and this is one of the things I would improve if I revisit this idea.