- Home /
Keep player grounded when going down hills.
How can I make my player not "jitter" down terrain? I tried physics materials, intense physics, and nothing works. I have had this problem since last night and I need it fixed. I have no idea of how I bypassed the issue on my last game, but I remember having the issue.
$$anonymous$$y first step would be to check out the code from your last game.
the difference is I used rigidbody.position ins$$anonymous$$d of transform.position in this game. I also set the gravity really powerful to fix it in my last game. That's all I can think of, I don't have access to the game itself.
you could potentially use its -y velocity from the rigidbody or something like OnCollisionStay (){} to tell the object to "hug" the terrain in those circumstances. I dont know how complex it would have to be to fit into your code but its a possibility
Answer by Nickston · Apr 27, 2015 at 11:13 AM
What kind of collider are you using at the feet area?
The old Unity 2D tutorial project uses a circle collider at the feet to prevent the jittering you're experiencing. I assume that if you're working 3D, you could add a sphere collider at the center of the feet.
Sadly, the sample 2D project seems to have disappeared off of the face of the earth.
Your answer
![](https://koobas.hobune.stream/wayback/20220613194107im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Jittering effect when moving character and camera 2 Answers
Gravity controller is buggy 0 Answers
Player movement jittery when hitting walls and using Rigidbody.MovePosition. 1 Answer
Why incrementing transform.position causes jitter on iOS 1 Answer
Has anyone had a camera jitter issue with Unity 2018.1 Timeline objects? 1 Answer