I’m trying to start a MultiTargetPath that is constrained by tags, but it doesn’t seem to be working. Does my code look at least like it’s on the right track?
Note that I’m setting NNConstraint.tags to seeker.traversableTags to make it consistent with the constraints of my seeker. But it doesn’t matter what I set NNConstraint.tags to – the MultiTargetPath behavior is always the same. It always assumes all tags are suitable and only creates paths that avoid “unwalkable” nodes.
MultiTargetPath p = MultiTargetPath.Construct (transform.position, endPoints, null, OnMultiPathComplete); NNConstraint nnConstraint = new NNConstraint (); nnConstraint.constrainTags = true; nnConstraint.tags = seeker.traversableTags; p.nnConstraint = nnConstraint; seeker.StartMultiTargetPath (p);
Am I missing something here? Or is this a feature that MultiTargetPath simply doesn’t support?
Thanks so much for your time.
EDIT: Come to think of it, I don’t need to manually set NNConstraints when I use seeker.StartPath(). Is there just something fundamentally different about MultiTargetPath where it simply ignores tags?