#Jittery Pathfinding

1 messages · Page 1 of 1 (latest)

spring wigeon
#

How do I fix jittery pathfinding? I set my NPC's network ownership to nil, only recompute when path is blocked, and it's still jittery.

(Note: For the first few times I spawn the NPC, it's smooth, but after a few dozen NPCs, they begin to jitter.)

#

Btw I'm not using MoveToFinished:Wait() too

#

I'm using MoveToFinished:Connect

clever finch
#

When you say a few dozen NPCs, do you mean a few dozen at a time?

spring wigeon
#

But sometimes there are a few dozen at a time (<= 20)

clever finch
#

And when there's that many, that's when they start getting jittery?

spring wigeon
spring wigeon
clever finch
#

So, after like a couple dozen have been spawned in total, regardless if there's multiple currently actually in the game, it gets jittery

#

Hm

clever finch
#

It's hard to tell the exact problem without the script, but so far sounds like a bit of a memory leak or improper removal of the despawned npcs in some way

spring wigeon
clever finch
#

Would you be able to send the script here?

spring wigeon
#

Gimme a sec

#

I'm eating rn

spring wigeon
#

Yo I'm back

clever finch
# spring wigeon

It's a bit late for me to read through that at the moment, but you should look through the script performance and see if the memory usage confirms if there's a memory leak or some other problem

#

Things might also not be getting garbage collected properly. I'm not sure exactly how the garbage collection works regarding pathfinding, but it might be worth looking into

spring wigeon
clever finch
#

Hmm

#

Well, I have to sleep. Hopefully someone else can help

spring wigeon
#

can a s3/s4 come here

heavy shadow
#

WaypointSpacing