Forum rules - please read before posting.

Nav mesh ignores clicks

We have a 2.5 D game that uses photographs and screen captures for backgrounds.  Nav meshes have been used for other scenes with no problem.  Each scene has several camera switches to show different parts of a room or different rooms.  The current scene has two cameras. First there is a cobblestone road and stairs that lead to a square. Then the second camera shows the square. The cobblestone road and stairs each have a nav mesh.  The square has a plane that was converted to a nav mesh. Neither one seems to respond correctly to mouse clicks. On the road, the character only moves toward the camera.  If you click quickly off the nav mesh, the character will actually fly into the air. In the square, you can move the character all the way down but he'll only go a short way up.  I've played around with the AC settings and mesh without success. 

Any thoughts as to what I'm doing wrong?  Is the scene too big for the player character?  I can't think of any other differences between this scene and the others.



Comments

  • It's difficult to give much hard advice without seeing some screenshots that detail what you have already, but check that the NavMesh GameObjects are on the NavMesh layer, have Colliders, are flagged as Navigation Static and match the shape of the baked NavMesh.
  • Most of the nav mesh that work are on the Ignore Raycast layer.  One of the ones that didn't work was on the default layer. Changing it to the nav mesh layer didn't help.  How do I add a screenshot?
  • Upload them to an image-hosting site such as imgur.com, and post the links here.
  • While trying to get screenshots, I managed to crash the program.  But, everything is up and running.  All but the largest plane was working.  I cut the plane in half and used one of the other cameras.  Things are working now on all scenes.  

    I have some remaining questions. For settings, what is the best setting for Nav Mesh search %?  Mine is currently set at 0.557 and the search direction is set at Radially Outwards From Cursor.  Destination accuracy is set as .7.  Pathfinding update time is set at 0.  When should that be changed?

    I have Disable Renderer selected and Ignore Collisions deselected.  Is this correct?

    I appreciate your help.  Adventure Creator is a great asset.  Sorry for all the questions.  I've worked through the tutorials and am reading the manual but I still have a lot to learn.


  • The settings will vary from game to game - it's really a case of what works for you.  If you find that there's an issue with navigation, only then should you look to change them - the default values are recommended for most games.

    The NavMesh search % is how far from a NavMesh the cursor can click and still cause the player to move, so that's just down to your own preference.  Destination accuracy will be based on your game's scale.  If you're relying on 1m for 1 Unity unit, 0.7 should be fine.  A non-zero Pathfinding update time impacts performance and is only necessary if you need to be able to navigate around moving characters.

    Disable Renderer and Ignore Collisions are only required if your NavMesh objects serve no purpose beyond laying out the walkable-area.  If they also act as physical floor (as in, they need to be collided with), then you won't want to ignore collisions.
  • Got it!  Thanks.
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.