Forum rules - please read before posting.

Teleport while walking, maintains previous path target

...and I'd like to avoid this, as I have automated logic put in place to change the default NavMesh on the fly (when the player is detected inside another NavMesh), but it's not quick enough to change it before the character tries to walk to the last target it had, and that means an undesired movement after being teleported.

I've tried to put a 'Move along path: Stop movement' action before and after the teleport action, but it doesn't make a difference. It still tries to resume its path and reach the border of the new NavMesh when it's automatically changed a little later by my custom logic.

Of course this could be avoided by adding a 'Change scene setting: change NavMesh' after the teleport action... but that's precisely what I'm trying to avoid with my code.

So, is there some "hidden" method to fully reset player movement and its path? Or even better could be if you could integrate it into a checkbox in the teleport action, heh heh... :P

Thank you.

Comments

  • Did you try the Recalculate pathfinding? option in the Object: Teleport Action?

    Calling the "Stop Movement" method in Character: Move along path should stop them regardless.  Which character is moving, and how are they moving?  Please provide details in the form of screenshots that show the issue along with the solution you've tried.
  • I tried recalculating, yup, but it is the same.

    Also, 'Move Along Path: Stop Moving' doesn't actually stop the character fully. It still wants to go to its target, even when I put the action before the teleport. Weird, right...?

    I think the main problem is that my 'Auto NavMesh' FSM is too slow, and no matter what I put after the teleport action, the default NavMesh is still the previous one.

    However, I've found a workaround. I've made gigantic NavMesh that encompasses every one of them, and just before running the teleport action I switch to it, so when the following Move To action is run, the pathfinding algorithm has a valid point to move to. And then the NavMesh is changed again, a short while after by my FSM.

    Kind of a dirty trick and I'd have liked something a little more automated, but it's working nicely anyway. :P

    Here's a video of both the player not stopping after the Move Along Path action being run , and also my "solution" of changing the NavMesh to a 'global' one.

    https: //youtu.be/BSOIUJp04AI

    Thank you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.