Spread out the cost of calling Scan()

Hi all,

Bit of a tricky situation here. I’m using the grid to handle my pathfinding - it’s a procedurally generated world, and rather than the player moving through different areas, the world shifts to accomodate for floating point area.

Original was using the Procedural Grid Mover, but had more success without it.

Basically, my current problem is that as soon as a ‘shift’ happens, the grid becomes outdated as nothing is where it was previously - and so I’m having to call Scan() again.

It’s a bit of a hefty hit (107ms) last time I checked. Is there any way that I can space this out over the course of 20 or so frames?

Appreciate any insight, thank you.

Hi

This exists in the latest beta version (3.8.3). You can download it from http://arongranberg.com/astar/download
It is a pro only feature however.

Aron, you’re amazing, thank you!

Such a quick response. Already left a 5 star review last time I needed your help, but good to see the service is at the same level.

Thanks!

1 Like