I am working on an underwater game where the user pilots a submarine around an underwater world. I would like to create an invisible spherical wall around the important part of my level, so that the user can’t leave the area (though they can see terrain extending beyond it) I thought I could do this by just putting a giant spherical collider on a null game object centered in the level. Unfortunately, the spherical collider seams to assume that other colliders should always remain outside of it, and will force rigid bodies with colliders outside of the sphere. Is there a way to create a spherical collider that will instead contain colliders, and prevent them from leaving?
Hi mat, you can set the spherical collider to trigger. Then you can ad a
OnTriggerExit function to the player so that something happens when they try to leave. If want them to run into a wall you will have to build a box out of 6 boxes. I dont think you can invert a collider.