Forum rules - please read before posting.

In-game navmesh switching

Hello all! I'm trying to have a player go from being able to walk on the default navmesh, and be able to switch to another navmesh in the same scene. The secondary navmesh is set up on an image of a couch above the floor (default mesh). I was successful in transitioning the player via adding a marker, but when I prompt the character to move on the second mesh it defaults to the original mesh. I figured this is because the logic is looking for the default mesh. I'm just not sure how to make the engine check and change the player to the second mesh. Any ideas would be greatly appreciated and helpful! Thanks!

Comments

  • This is for a 2D game?

    If the NavMesh is a separate object, you'll need to use the Scene: Change setting Action to expliticly switch over to the new NavMesh after moving the Player over it.

    If your NavMeshes occupy different spaces, it's also possible to combine them into one by attaching both PolygonCollider2D components to the same object - see the Manual's "Polygon Collider pathfinding" for details.

  • Yeah, it's a 2D game. The idea is to have a cat be able to go from walking on a floor and by clicking on a trigger or hotspot have the sprite transport to the second navmesh set over a couch so it can move on the couch.

    Thanks Chris! I'll give those both of those options a shot to see what may work best. Appreciate the help!
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.