I have a character controller that is standing on top of a gameobject cube. I would to like to keep the character controller from going over the cube's edge boundaries. Is there a value I could check to see if the controller is near or going over the cube's edge boundaries? I want this to function like an invisible collider turned inside out, keeping everything inside rather than push it away.
View attachment 120132
View attachment 120132