- A* version: [5.4.7]
- Unity version: [6000.0.84f1]
This is a bit of a follow up from the post: “Know if the player is Unreachable?”. (Tried to link it but not allowed yet!)
admin edit:
I have currently been struggling with this problem for quite a while, where the agent will simply go to the closest node it can traverse until getting stuck there. While I have managed to implement the solution from the previous post myself, it leads to very janky movement when the player is unreachable because it needs to consistently figure out if the player is reachable again by attempting to find it again, leading to jittery movement as it twists and turns managing the new path. I have remedied this somewhat by changing UpdateRotation and UpdatePosition but this leads to other types of jitter and also risks breaking the visuals in other instances if done carelessly, because of custom animations on link traversal etc.
My ideal solution is something like this:
Calculate path to player using Agent constraints (do not give to agent) → Check if path to player is complete
If Path is complete → Give path to Agent
Else → Give a different target
I’ve been trying versions of the solution in the previous post but ABPath calculations seem to always return nodes at the players position.
Other solutions I tried were things like using NNInfo Constraints to find walkable nodes and calculating distances to see if the player was reachable but this didn’t work.
I’m sorry if I am missing an obvious solution, been trying my best at working with the Tutorials and Documentation before posting. Been loving this package and had no issues working with it up until now!
Thanks in advance!
