I had no idea I was having an issue with the standard isGrounded check from the standard Unity Character Controller until I broke down my project and code.
My project/code is showing isGrounded = true in this photo when my player is clearly very high up off the ground. It is making certain movements inconsistent and almost broken because my player gets stuck where they should not like on the edge of this cube object. Ground should only be detected if the very bottom of the capsule is touching it.
Is this just the limitation of the standard controller.isGrounded check or do I need to manually add code to adjust this to my preference? I have tested this using three different very simple scripts so I don’t believe it’s a code issue. All I use is isGrounded = controller.isGrounded;
CharacterController.isGrounded just checks if the bottom part of the capsule was intersecting with any collider the last time .Move() was called on it.
It’s very literal in that sense.
So in that image I can see just a bit of the capsules bottom cap is against the cube, so isGrounded makes sense to be true.
You can always combine it with other methods to get more accurate or specific results. It is of course, very simple and generalised.