Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

C# Keep Character Controller Within Gameobject edge Boundaries

$
0
0
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

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>