Recast Graph Penalties

Hi

I’m having trouble with my penalty areas on the recast graph.

  1. the accuracy is not great i have a big world and need tile size minimum 64, is there away to make the edges “fuzzier” or a better way to do penalties that apply to some npc and not others?.
  2. can the penalties be applied by Graph Update when the graph is cached on start up (this doesnt seem to work for me at the moment)?
  3. the penalty doesn’t always seem to appear often I have to rescan more than once to get them to appear.
    image

Hi

Generally recast graphs are not optimal when using penalties exactly for the reasons you describe here. A grid graph is usually better if you are using penalties.
If you want them to apply to different NPCs then you might want to use tags instead (they will have the same limitations with regards to resolution though): https://arongranberg.com/astar/docs/tags.php
2. If you are using the GraphUpdateScene component I think it assumes the penalty was already baked into the graph when it was cached. If you are for example spawning new ones during runtime you could call the Apply method to force it to apply the graph update again.
3. Hmm, that’s weird. Are you using the normal GraphUpdateScene component?

Thank you for reply

if i scan to generate a recast graph cache and then go into playmode i dont see a penalty area, if i scan in playmode after loading the cache i can see the penalty area, it doesnt seem to get loaded from the cache without a rescan. I will try that method, yes just normal graph update from the demo