This might sound weird but how the repath is working? I am trying to understand how it works for performance reasons. I set the repath to be invoked every 0.1s and set the path logging to heavy. I assumed that when I’ll update the destination for my agent it should repath every 0.1s after started moving, but I didn’t see anything in the console except the initial path search. So am I misunderstanding something and it works in a different way or just doesn’t logging it? Any hints?
So basically how Repathing works (on Dynamic, at least), is that it will recalculate a path at least every x seconds, defined in the maximumPeriod
. However it will make a new path more often if the destination is constantly changing. The maximum is just basically “well, it’s been x long, I better make a new path for the sake of it”.
If you’re worried about performance, I’d set the maximumPeriod
to be higher not lower. If you set it to 0.1s, then your units will try and make a new path even when nothing else has changed. IIRC, default is maybe 2 seconds, so you’d be calculating 10x more paths per unit than default. Basically, higher numbers are more performant here
Let me know if that clears it up.
Also, I’m curious about the path logging. My units are constantly debugging their path information and mine is only set to Normal, not Heavy. Let me know if you need assistance figuring that out as well