Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Changing Character Controller Size?

Discussion in 'Physics' started by QuindecimX, Jan 16, 2022.

  1. QuindecimX

    QuindecimX

    Joined:
    Jul 12, 2017
    Posts:
    22
    I've set up a character controller and nearly perfected my scripts with it. Only problem is, when my player is crawling, I can only shrink the character controller's capsule by its height. I can't change its width on a single axis, nor can I rotate the capsule to properly cover the player's body, resulting in my player clipping most of its body through objects (like walls, doors, etc).

    I tried adding a box collider (that enables itself when the player is crawling), but my player still clips through objects (until the object collides with the shrunken character controller capsule). Objects seem to recognize only the character controller when it comes to collision, but not any other colliders I add on to the player. What can I do to fix this?

    I found some years-old posts about this same issue and people were telling the OP to dump their character controller and use rigidbodies instead to be able to use custom shapes. They also claimed to the OP that their player won't clip through any walls or doors whether they're walking or crawling.

    Please tell me in 2022 Unity has updated its character controller features since then and I'm just missing something? If I have to dump my character controller and switch to rigidbodies I'm practically starting all over again from the beginning having to rewrite all my scripts that use/add on to said character controller...