You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IndexedAStarPathFinder assumes that you have a known-ahead-of-time finite graph prepopulated with nodes that you can pass in as arguments to searchNodePath.
In my code, as the algorithm is "exploring", it generates new connections and nodes on the fly, which seems reasonable, as I'm modeling my grid using Vector2s. However, because of this line of code, the code never terminates, because current.node will never have the same identity as endNode.
What I'd like to see is either current.node == endNode replaced with Object.equals(current.node, endNode), or a call to a protected method that I can override, e.g. isAtDestination(current.node, endNode) or nodesEqual(curent.node, endNode).
Reproduction steps/code
Please provide the steps to reproduce this issue, or even better, a SSCCE that reproduces your issue.
Issue details
IndexedAStarPathFinder
assumes that you have a known-ahead-of-time finite graph prepopulated with nodes that you can pass in as arguments tosearchNodePath
.In my code, as the algorithm is "exploring", it generates new connections and nodes on the fly, which seems reasonable, as I'm modeling my grid using
Vector2
s. However, because of this line of code, the code never terminates, becausecurrent.node
will never have the same identity asendNode
.What I'd like to see is either
current.node == endNode
replaced withObject.equals(current.node, endNode)
, or a call to a protected method that I can override, e.g.isAtDestination(current.node, endNode)
ornodesEqual(curent.node, endNode)
.Reproduction steps/code
Please provide the steps to reproduce this issue, or even better, a SSCCE that reproduces your issue.
Here are the relevant bits of my code:
Version of gdx-ai and/or relevant dependencies
gdx-ai 1.8.1
Stacktrace
No stacktrace.
The text was updated successfully, but these errors were encountered: