- Home /
Character Controller Jitters When Jumping Next To Objects
Here's a video of the issue in action- https://youtu.be/FrbIcUZVkMo
And here are the Character Controller's current settings-
Jumping while pushing against/ standing next to objects results in intense jittering. Setting the slope limit to 90 fixes the problem, but isn't a solution because it allows the player to run up very steep inclines/cliffs. I've messed around with various settings, but I haven't been able reduce or fix this problem. Any suggestions?
Answer by balfire · Mar 30, 2018 at 06:11 PM
What i did was to set the slope limit to 90 only when im jumping. When im walking it is 45. So when you press the jump button set the slope limit to 90. And when you land set it back to 45. Not the best solution but it works well enough.
Answer by NathoSteveo · Dec 02, 2020 at 05:48 PM
Bump. I know this is an old thread but I have the same problem :(
Edit: Found a solution by changing your Step Offset value. Try setting your Step Offset value to something smaller like 0.1. When you jump up near an edge your Step Offset comes into account.
Very great thank you very much! 40 $$anonymous$$s of googling just pays off.
Answer by tscpp · Mar 14, 2021 at 10:11 AM
I set the cc stepOffset to 0 while in air. This works perfectly for me. Also fixed so the character couldn't jump higher than intended exploiting stepOffset near an object while jumping.
isGrounded = Physics.CheckSphere(groundCheck.position, 0.1f, groundMask) || yBefore == transform.position.y;
yBefore = transform.position.y;
if (isGrounded)
controller.stepOffset = originalStepOffset;
else
controller.stepOffset = 0;
Thank you!! I know very little about Unity and didn't realize that ctrl.stepOffset was a thing!
(If anyone struggles with a lack of gravity, just don't use the yBefore. The jittering is still gone, and the step offset changes when I jump.)
Answer by Whiteleaf · Jan 22, 2021 at 01:33 PM
I know this is a very old thread, however I've been having this issue for years. I fixed it with the answers above, by setting my step offset to zero when I'm in the air and back to the default value when I'm on the ground.