CharacterController.isGrounded, What defines ground?

Hi,

I’m kinda new to unity, I’m trying to make a game (for ludumdare, cause i figured its a good way to learn this program), and I’ve run into something that is most likely very easy to solve.

So, I’m making a third person platformer, and am trying to make gravity with a character controller. Basically, I have this:

if (controller.isGrounded == false) {
transform.position += transform.up * grav * Time.deltaTime;
}
else
{
print(“Grounded!”);
}

The problem is, its never being grounded. What makes controller.isGrounded == true?

I have a box under it, with a box collider, but it doesn’t do anything with they touch.

I Think controller.isGrounded will be true when player collider touches some collider under it

Does a Box Collider count? Cause I have one under it, but it just goes right through it without running the else statement…

I’ve been trying to figure it out for certain, and I think it’s when something is touching the bottom hemisphere of the controller.

Yes a box collider should work, as soon as the bottom of the character controller collides with it isGrounded should be true. Im not sure if it is collisonFlags that set it, try using CollisionFlags.CollidedBelow

I think thats the issue. I’m moving the object, but not the character collider. So I may be dumb.