I have examined the problem and here are my thoughts.
The problem Denno was having was much more general, and even though it is a good solution, I feel like it is a bit too complex for my use case, unless I missed something. What I was imagining would more be like inserting breakpoints while following a path, so the agent would do something like this:
- Start following a path
- Constantly check if the next rounded Vector3 (node) in the path is a door. Example: currently on
(0,0,0)
, next node is(1,0,0)
. It may be worth noting I use a custom TraversalProvider so the agent already completely avoids doors if he cannot go through them. - If the next node
(1,0,0)
in the path is a door, check if it is open. If it is indeed open, simply keep going. If it is not open, stop at the node in front of the door (the node we reached before we realized there is a door at the next node) and order it to open. During this process keep checking if it’s open, and when it is, continue.
I know my use case may be a bit more specific but I feel like it should be simple enough to implement following the above steps. I’m just not sure how to get the information I need and in which part of the movement update code I should apply this logic.
If this truly cannot be done with the current features, then adding the solution you mentioned would be a start and I’ll continue from there. However, I’d really appreciate if you could think of a way to solve this with what we’ve got already, given the steps above.
Thanks Aron!