- Home /
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.
Answer by Rob2309 · Nov 05, 2016 at 03:39 PM
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 :)
Your answer
Follow this Question
Related Questions
How to validate camera when collides with a wall - ThirdPerson 2 Answers
Parented Rigidbody Collisions 0 Answers
Character looks super jitery while moving? (2d) 1 Answer
Weird Glitching With Camera 0 Answers
Camera Collision Lerp Problem 0 Answers