- Home /
Stop movement when at walls
I need help making a script to make my object stop when it hits the walls, but u would still be able to move in the opposite directions. Im sorry for the noob question i just started with unity a few days ago.
Comment
Answer by StephanK · Jun 15, 2010 at 09:48 PM
If you use a CharacterController to move your objects they will stop at walls (if they have colliders attached) automatically.
Your answer
![](https://koobas.hobune.stream/wayback/20220613062215im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Wall collision problems!! 3 Answers
Disabling sound coming through walls 2 Answers
Camera going through objects while developing,Camera going inside of wall while developing 1 Answer
How to check direction of wall on character controller hit? 2 Answers
Player is moving through walls when force is added from a knockback script? *UNANSWERED* 3 Answers