Forum rules - please read before posting.

Character walks beyond Navmesh (In direct mode)

edited February 2017 in Technical Q&A
Hi
I've just started a new project, and my character basically ignores the navmesh and walks all over the screen.

Also, when I add a new Navmesh, it automatically gets added to the _gamecamera folder rather than the _Navigation folder.

I am using the direct control method (Keyboard and controller) If I switch to the point and click method, it seems to work fine. I'm using that until the issue gets resolved (I hope there's no problem if I keep switching modes) 

Here are some screenshots
image

image

Comments

  • edited February 2017
    I added an NPC with a box collider, and the player ignores that too.
    Let me know if I need to provide any more information

  • edited February 2017
    Welcome to the community, @armaan.

    Please see the Manual's Section 2.3 regarding Direct control - the Player does not rely on the NavMesh for restricting movement when moving with this method.  The NavMesh will only be used by NPCs, and the Player during cutscenes, provided that the NavMesh is correctly assigned as the Default NavMesh in the Scene Manager.

    To restrict the player's movement when moving under Direct control, you need to set up colliders along the boundary.  This can be done with your own collider objects (such as a Polygon Collider), or via the Collision Cube 2D prefab provided by the Scene Manager.  Such colliders will need to have Is Trigger unchecked, and you will also need to ensure that your Player has both a Rigidbody2D and Circle Collider 2D on his root (again with Is Trigger unchecked).

    As for the NavMesh being placed in the wrong folder, check that your Camera perspective setting in the Settings Manager is correctly set to 2D, and that your Pathfinding method in the Scene Manager is set to Polygon Collider.
  • Thank you! That fixed it. :) 
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.