I use recastgraph + FollowerEntity. Before that, I tried RichAI.
I have approximately 120 entities. I also have some navmesh cuts that are setup to update the graph every 0.4 (but they don’t always move, they are some vehicles in my scene).
When timescale is 5 inside unityeditor, the system is under stress. By the way, to reproduce the problem, I sometimes select some FollowerEntity in my scene : this is even slower. I suppose that when the inspector draws the data, the getters are locking the threads temporarily.
When the system is under stress, timescale 5, I realise that some entity, teleports/jump from one place during their movement (ex: a fireman suddenly teleport 5 meters away) and continue their movement from this place.
I am not sure if this happens during ‘path pending’ or during movement without path pending.
What is more surprising is that I did not have that problem with RichAI :
RichAi was obviously less stable overall (because not made to support timescale 5)
But RichAI was not jumping around.
I wish that is error in astar, so that i only need to update to correct it .
What do you think?
Best regards!
EDIT : I just have followerEntity (no funnel, no seeker) here the setup:
Are you able to provide any more detail about this specific scenario? Like, do they just randomly move in any direction? Always a certain vector and value? Or something else entirely? Any videos of this would help a lot as well
For your information, I tried to recreate the bug in a specific scene on a plane, but the bug never occured in the test scene (I will probably try to export/import my recast graph to get the bug).
I am trying to upload the video now.
the victims on the stretcher on the floor use NavmeshCut
the moving victims on the stretchers not on the floor use FollowerEntity
the “moving NPCs in group” around the stretcher are simply pinned to the corresponding victim (with a parentconstraint).
therer are also moving NPC alone without victims : they use FollowerEntity.
The walk animation is on/off simply based on “did the NPC change position since last frame”.
In the video, near the tents, you will see some jumps.
EDIT: my mp4 is refused.
EDIT: my gif is 3.0Mo but it is still too big?!
I changed the period of recalculating path (put 1 every 1000 seconds).
The NPC still seem to avoid the moving navmesh. Is that the expected behaviour?
I can still see some jumps though.
Then if i make all vehicles (bus/cars with navmeshcut) instaneously teleport, I see no jumps anymore with the NPCs and victims.
Yes. The FollowerEntity needs to have path. If the navmesh changes, it’s necessary for it to recalculate its path. You can forcibly disable this by setting the recalculation mode to Never. But then the agent might get unhappy, if its path disappears.