I am making a game where I do not want the player to go outside a certain boundary. I can create a few box colliders and define that boundary. But a sphere collider with a inverse type would be much better for my superman style game. Where I can attach a sphere collider to an empty game object and scale it. But doing so will push the player outside of the collider. That’s why I need somewhat inverse effect so that player stays only inside of it. It does not exist but experienced people might have done something similar. So I would like to know if it is possible and if so how.
TIA.
2
There is no Inverse collider that can do this because colliders works moving each other collider in a direction that is usually calculated with the center of the collider.
BUT you can put some gameObject that tracks the player and some radius of boundary.
So if the tracked object (player) goes outside of radius is forced its position to be inside of radius.
2