I don’t know if it is because of friction? When my player is against pretty much any object with a collider and then when I jump it jumps so high. I’ve tried using raycast to ground and that is not helping, also tried the normal controller.IsGrounded and not working either.
Your RayToGround code is the main issue here. Only the Debug.Log call is inside the if statement for the raycast. If the raycast doesn’t hit, the RaycastHit won’t get overwritten. So on line 23 you’re testing an old RaycastHit. Basically once you’re grounded once, you’ll be grounded forever.
It didn’t fix my issue, still if I go against a wall the player still jumps super high. I think something else is the problem within the project itself?
Debug it. Print out each frame whether you’re grounded or not. If you’re still grounded in the air, it’s a bug in the code or how your character is set up.
Hey again,
I did what you said. Saw no problems.
But I did something else that acutally fixed it, I just increased th step offset to 1 instead of 0.3. In the CharacterController. So now the bug is not there anymore. Thanks for your time!