Search Unity

How to stop a door from jerking when it's stuck between a collider and my character?

Discussion in 'Physics' started by ez06, Jun 1, 2020.

  1. ez06

    ez06

    Joined:
    Feb 18, 2014
    Posts:
    45
    My character pushes the door open. It opens up until it hits the wall.

    Door uses a standard hinge joint component with limits of 190 degrees (although the wall collider only allows 180 degrees)

    The problem happens when my character walks into that door, so it's stuck between the wall's colliders and the character's capsule collider.

    At that moment it starts being jerky and behaving erratically.

    -How can I make sure the door stays in place (not jerky) when stuck between the 2 colliders?

    -Also, how can I make it so that the wall's collider is "stronger" than the character's collider? (basically I don't want the door to go through the wall's collider, and end up behind the wall).

    Thanks