- Home /
Rigidbody makes NavmeshAgent stutter in its movement
So I have a simple NavmeshAgent controlling a car and another car controlled by the player via rigidbody.add force, The problem is whenever I go near the agent with my rigidbody car it starts to stutter in its movement but once I am away from it, It moves perfectly. Any idea why is that? I even removed all of my scripts from the scene to make sure there is no conflicts here or there.
I have the same identical problem, the question is old but are there any answers?
The new navigation system handles dynamic path finding a lot better now and I haven't had any problems using it, if you are having the same problem make sure you are using the latest path finding done by unity and also to not use more than one path finding system as they tend to negate each other.
Actually the stuttering came from my main rigidbody (the player) and not the AI agents. I'm opening another question.
Have you tried changing the 'Obstacle Avoidance' settings or setting it to 'none? to see if it has any effect? Does it stop happening when rigid body is momentarily turned off or force isn't being applied?
Answer by unity_060jboUqGuJBew · Jan 18, 2020 at 08:04 PM
I know this is old, but I found this so I thought I'd leave an update for others like myself also finding this later.
https://docs.unity3d.com/Manual/nav-MixingComponents.html
TL;DR; use "Is Kinematic" on your RigidBody when combining with NavMeshAgent to tell unity that something else is controlling your body. This way you won't have a race condition (which is what the stutter is).
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
A little help with using Navmesh agents with RigidBody physics. 0 Answers
Stop Wheel Colliders from flipping over 1 Answer
add force get stronger over time slow. 2 Answers
Car Accelerate Over Time. (JavaScript and RigidBody) 2 Answers