Forum rules - please read before posting.

limiting nav mesh to camera

Hi, I'm trying to swap or limit nav mesh to sertain camera. I don't seem to find any action list command to swap nav mesh, and I'm not sure if I could limit nav mesh to a camera.
Any ideas?

Comments

  • What is your scene's Pathfinding method property? If it's set to Mesh Collider or Polygon Collider, you can switch the NavMesh using the Scene: Change setting Action to change the active NavMesh.

    This is not possible if you're using Unity Navigation, however, since AC will refer to the baked NavMesh for where characters can move to.

    Are you looking to limit the ability to point-and-click to a certain area, or block a character's ability to pathfind to a certain area regardless of the way in which they were commanded? Any screenshots or further detail you can share will help clarify the situation.

  • Here in front of shop there are two separate areas:
    https://imgur.com/vq4Jnzl

    And the red areas are where I would like to have pnc enabled for the camera showing the area. I still would like the player to walk the short distance between the areas after clicking the white forward arrow - which start the area change and camera transition with with short time.
    There are longer distance moves, in which I want to crossfade camera and do transport to a marker close to play area and the start walking towards the area.

    Here are two images from same shop with separate areas. Player should not be able to click area in other camera area.
    https://imgur.com/N3EG4FZ
    https://imgur.com/d5iER2O

    I have made just one smaller lobby scene, in which I used Unity navigation, but I'm going to refactor it anyway after learning more better practices.

  • There are a couple of ways to limit PnC movement when using a pre-baked Unity NavMesh. Which one you use will depend on the situation e.g. camera angle, obstacles etc.

    1. Place invisible colliders on the Default layer to cover areas of the screen that you don't want movement clicks to register. This is mainly used for e.g. walls that have a NavMesh on the other side, so that clicking the wall doesn't cause the Player to move behind them.
    2. Separate your NavMesh floor into separate objects that can be controlled individually. For PnC movement clicks, the floor object must be placed on the NavMesh layer. You can change an object's layer with a simple script if you want to prevent it from being clickable at that time.
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.