Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using NavMeshAgent in my Unity project to calculate and move my object to a particular location.

When I do:

navMeshAgent.destination = destinationPt

the object starts moving, but the motion of the object is very jerky.

Is there a way to override the function which is responsible for the jerkiness of the object motion? Or is there a way I can remove the jerkiness of the motion some other way?

I also tried setting

navMeshAgent.updatePosition = false

after which I use

navMeshAgent.CalculatePath(destinationPt, path)

to get the path, but then after this I am not able to figure out how to write my own logic to make the object move. I want a smooth motion with a given acceleration and a max velocity.

share|improve this question

Your camera movement is jerky, not the movement of your object.

When updating the camera position it's best to use LateUpdate, this ensures that the update takes place after all of the other Update calls. This means the position of the camera will be accurately positioned for the same frame you're updating. As stated in the documentation:

For example a follow camera should always be implemented in LateUpdate because it tracks objects that might have moved inside Update.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.