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?