I asked over at Unity Answers how to resolve a problem with a 100ms input lag from when I declare NavMeshAgent.isStopped = false & the player actually beginning movement.
This is very noticeable, but I also verified it with System.Diagnostics.Stopwatch. It varies from 50 to 100ms, but is nearly always noticeable when I play. It’s unacceptable input lag.
Does anyone else notice this input lag when using NavMeshAgent.UpdatePosition = true & letting it all handle itself automatically?
I’d still like to know if other users are reporting any input lag. (I might be doing something wrong with my navmeshsurface generation.)
I figured out why I’m getting the lag though. The path is taking too long to finish calculating. Even though it’s an extremely simple straight line with no obstacles, it is taking too long.
If others don’t get this input lag, then perhaps I could figure out WHY my SetDestination(position) is taking so long to calculate.
You could try to increase NavMesh.pathfindingIterationsPerFrame to make sure your path is calculated faster or use NavMeshAgent.CalculatePath to get the path immediately.
I didn’t use unity’s navigation system in my multiplayer game. I tried using it in a much simpler project, and quickly learned how awful it is for the type of games I make so I switched to A*PP which was wonderful.
Somehow whenever I run into you @CarterG81 it seems to be to bemoan how awful Unity’s implementation of certain features are. Last time it was UNet. Not saying you’re wrong, to be clear ;p
Yea, that makes sense. I’m not a fanboy at all, so I just tell it like it is. Unity’s stuff is pretty awful on quite a consistent basis.
I mean, just look at the now defunct UNET. Even Unity thought it was so awful it wasn’t even worth fixing.
I only use Unity for the Asset Store, which means I literally use Unity for everything that isn’t developed by Unity Technologies. Even Unity itself hires/absorbs the asset developers instead of doing things themselves. That’s kind of their thing. Almost like they know their own work is always awful so they jump to the idea of letting someone else fix it. It’s weird.