Physics2D.Raycast

I personally prefer to cast some ray down on FixedUpdate from the Player GO instead of heaving extra collider:

RaycastHit2D hit = Physics2D.Raycast(transform.position, Vector2.down, distance, _groundLayerMask);
if (hit.distance > Mathf.Epsilon && hit.distance < minDistance) {
  _isTouchGround = true;
} else {
  _isTouchGround = false;
}

Privacy & Terms