예제 #1
0
    public RaycastHit2D GetHorizontalMiddleCollision(Vector3 direction)
    {
        float raycastDistance = _collider.bounds.extents.x + COLLIDER_SIZE_OVERFLOW;

        return(Physics2D.Raycast(_collider.Center(), direction, raycastDistance, _groundLayer));
    }