bool
GetPortal
(
GraphNode | other | The node which is on the other side of the portal (strictly speaking it does not actually have to be on the other side of the portal though). |
List<Vector3> | left | List of portal points on the left side of the funnel |
List<Vector3> | right | List of portal points on the right side of the funnel |
bool | backwards | If this is true, the call was made on a node with the other node as the node before this one in the path. In this case you may choose to do nothing since a similar call will be made to the other node with this node referenced as other (but then with backwards = true). You do not have to care about switching the left and right lists, that is done for you already. |
)
Add a portal from this node to the specified node.
This function should add a portal to the left and right lists which is connecting the two nodes (this and other).
ReturnTrue if the call was deemed successful. False if some unknown case was encountered and no portal could be added. If both calls to node1.GetPortal (node2,...) and node2.GetPortal (node1,...) return false, the funnel modifier will fall back to adding to the path the positions of the node.
The default implementation simply returns false.
This function may add more than one portal if necessary.