- Home /
Character Controller squeezed between colliders freezes Unity
I keep running into a problem with a character control script I'm trying to create (using the Character Controller) now that I'm attempting to implement a crouching mechanic. I use the script to change how tall the Character Controller is when I hold down "C". Only if the character squeezes into a space that's just too small, but not so small that it can't wedge itself in, Unity freezes and I'm forced to restart the program.
Here's a picture of the situation that's causing the freeze up:
The character is currently crouching (you can tell because the Controller capsule is shorter than the character (the block in this case)). I think the freeze happened while the Controller was trying to move the character forward under the upside down staircase.
My only guess as to what's happening is that the engine gets stuck trying to either change the shape of the Controller, or somehow deal with the collision. I think I can fix it with another trigger collider that sits just above the top of the Controller and it just makes sure that the player can't move under something that's too low. However, I'd like to know what's causing this. If anyone has any ideas, please let me know.
Your answer
![](https://koobas.hobune.stream/wayback/20220612165347im_/https://answers.unity.com/themes/thub/images/avi.jpg)