UCC character stuck in walls? Here are the two possible reasons

Haytam95

Active member
Hi

Recently I had a trouble and found out the solution, to anyone out there that their characters are being stuck in vertical walls and are unable to rotate here are two posible reasons:

Skin width less than 0

As pointed out here: UCC Getting stuck on vertical walls

Capsule collider not perfectly centered (My problem):

Always, always (ALWAYS, especially when creating original prefabs, variants or changing models) check that the capsulle collider is perfectly centered at 0; 0.

1597633975921.png

(Here is my screenshot. THIS IS WRONG, check X and Z axis), that was some weird Unity conversion when creating prefabs.

Or else the character will stuck in walls and you will swear to all gods because it's a silly mistake, but one very hard to find (It took me two hours)

If the capsulle isn't perfectly aligned to the parent object (which also should be perfectly aligned to the parent and so on) the CharacterLocomotion script will perform a manual check of the rotation against collisions (something quite expensive also) and if the angle is of rotation is higher than slope then the rotation will be overriden to 0; 0; 0 (your character won't rotate).


TL;DR

- Check that your skin width > 0
- Check that your capsulle collider center is at 0; (anything); 0

Hope it will help somebody!

Regards!
 
Top