Forum rules - please read before posting.

Problems with making a navmesh hole similar to the one in 2D tutorial

edited April 2017 in Technical Q&A
Hi, so I recently bought AC and now I'm going through the 2D tutorial and I'm stuck on creation of a navmesh hole. Searching the forums did not provide a solution so I'm posting this here.

I followed the steps as follows:

1. From AC Game Editor I created a navmesh prefab by clicking "NavMesh 2D"
2. I edited the polygon to more or less fit the room
3. I then created a new empty object and attached a Polygon Collider 2D component to it and edited the polygon to fit the desk and named it "deskHole"
4. I dragged the newly created deskHole to the _NavMesh folder
5. I set number of holes to 1 and dragged deskHole into the slot

Now when I run the game I should  see both navmeshes combined in the scene view but that is not happening.

Screenshot of NavMesh2D: http://take.ms/LTIKi
Screenshot of "deskHole": http://take.ms/jwt3k
Screenshot of the scene view at runtime: http://take.ms/UHAXy

I'm using Unity 5.6.0f3 with the latest version of AC. Any help would be highly appreciated.

Comments

  • Welcome to the forum, @R34nimator.  I apologise for your trouble this early on.

    The steps you've posted appear correct - I followed them myself and found no issue.  The images all look correct, too.  And your Pathfinding method at the top of the Scene Manager is set to Polygon Collider?

    Have you confirmed that this is not just a visual issue, and that a player indeed will walk through the hole's boundary?

    If the hole is successfull added at runtime, AC will automatically check Is Trigger on the hole's PolygonCollider, to prevent unwanted collisions.  Is this happening?

    As you've followed the steps and the screenshots don't show anything amiss that I can see, PM me the scene and I'll take a look at it for you.  No graphics necessary - just the scene file itself, plus your Managers, wrapped up in a .unitypacakge file.
  • edited April 2017
    I somehow managed to solve the problem and I'm not exactly sure how since I didn't attempt to do so. I just decided to go further in the tutorial and add a character to see if it's just a visual issue or something more.

    It is now working: http://take.ms/RIvLW

    It might have been just a visual difference and nothing more. 
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.