Why does the player fall through the floor after colliding with a kinematic animated door?

My player has a character controller, and when it collides with a door that contains a box collider, a kinematic rigidbody with interpolate and continuous collision detection enabled, the player falls through the floor. This happens when the door is closing. For the door animation, I am using coroutines:

private IEnumerator RotateDoor(Quaternion targetRotation)
{

while (Quaternion.Angle(rb.rotation, targetRotation) > 1f)
{

    rb.MoveRotation(Quaternion.Slerp(rb.rotation, targetRotation, Time.fixedDeltaTime * rotationSpeed));

    yield return null;
}

rb.MoveRotation(targetRotation);

}

Any idea what might be happening and causing this issue?

93ubfe

The character controller doesn’t interact with rigidbodies in any special way and their colliders are treated as static colliders. This can cause issues and while there’s workarounds it’s often easier to just use a rigidbody for your player.