How to fix glitching walls? Unity5 2D topdown view

I am making a 2d top down view game but when my character hits a wall and continues walking in that direction he shakes a lot. This a a problem for two reasons: The camera is fixed to the character and it doesn’t look good at all. My character has a boxCollider2D and a rigidbody2D (as well as a script, obviously) and the walls are only empty objects with a box collaider2D. How do I fix this?

PS: English is not my primary language.

If you are using the RigidBody to move your character, e.g. with AddForce or MovePosition, you should only be doing so in the FixedUpdate function instead of Update, since the Physics system expects you to only use physics in FixedUpdate. I hope this helps :slight_smile: