How to make the BackSide of my sphere immovable?

Hello guys, I am creating a world with a character moving on it. My sky is a SphereGeometry and all my character and object are inside this sphere. I want to make the backside of my sphere not movable so my character cannot move outside of.

Here is my code : GitHub - IssamMerikhi/portfolio

Thanks for helping

Have you considered to just compute the character’s distance from the sphere’s origin and prevent any movement if the distance is greater than the sphere’s radius?

In this way, you avoid more complex solutions which might include some sort of collision detection.

3 Likes

thanks, it worked :slight_smile: