Search Unity

[Solved] Slope Mesh + Box, Character Controller Gets Stuck

Discussion in 'Physics' started by JasonBricco, Sep 25, 2015.

  1. JasonBricco


    Jul 15, 2013
    Hey all, I have yet another issue I cannot figure out the answer to. This one is simpler to explain.

    Let's say I have this set up:


    There are two box colliders on the sides, and in the middle is a slope such that the base of the slope is at the base of the box colliders, and the top is at the top of the box colliders.

    Now, when I move my character using the first person Character Controller up this slope while pressing against the sides of those cubes, I get stuck near the top and can't move forward anymore. I can move up and over the slope in the middle just fine - the problem only happens when I press against one of the sides while moving up.

    Why is this?

    Controller settings:

    Slope Limit: 50
    Step Offset: 0.3
    Skin Width: 0.05
    Min Move Distance: 0
    Radius: 0.3
    Height: 1.8


    Edit: if I put another set of box colliders on top of those two side ones, this problem doesn't happen. It only happens when the slope's top is at the top of the boxes.
  2. JasonBricco


    Jul 15, 2013
    So, it seems the solution was very simple: add a rigidbody to those colliders.

    That thought never occurred to me. But can someone explain why that fixed it? Because I have no idea.
  3. Atto2O


    Aug 19, 2018
    I think its because the radius start to reduce. I have the same problem, how did you set up the rigidbody? and did you insert it in the Boxes?

    Attached Files: