Ground check in 3d environment

Hi guys im using this method to do a ground check on a 2d demo i made and it works well.

public bool isGrounded()
    {
        RaycastHit2D raycast2D = Physics2D.BoxCast(playerStandingCollider.bounds.center, playerStandingCollider.bounds.size, 0f, Vector2.down, .1f, Ground);
        return raycast2D.collider != null;
    }

I’m trying to make something similar for a 3D model character, but when i remove 2D off everything, Ground gives me an error. Tried reading the documentation for RayCastHit but couldnt see how to structure it the same as the 2D version. Please help

There’s SO many examples of this on Youtube dude…

Here’s two more examples:

1 Like