- Home /
Navmesh and Rigidbody Causing Camera Jitter
So my game's player is controlled by input keys and changing the velocity on its rigidbody and all the other NPCs are controlled by navmesh. I noticed that when a NPC chases the player, it will jitter around when the camera moves with the player.
I read up on this and I know it happens because of a Update/Fixed Update/Late Update issue. I use Pro 2d Camera and when I changed it from Fixed Update to Late Update, the enemies stopped jittering but instead, the player started doing it. I've tried moving the SetDestination of the NPCs in different Update/Fixed Update/Late Update functions and same with the player's rigidbody velocity change but that's not working.
How can I fix the jitter for both the NPCs and the Player? Some answers recommend changing something with the camera but I don't understand those answers at all, I didn't write the camera so I have no idea how to edit its code.
Your answer