Search Unity

A Couple's Navigation Help Please

Discussion in 'Navigation' started by UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396, Aug 18, 2020.

  1. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    I have a couple of navigation questions that I need help in.

    1. I have a battleground. There is an interactable object, Jump Pad, that is not an obstacle (marked as 'Walkable') but how do I go about getting my AI to avoid going there? I'd like to only make my AI move to the Jump Pad and interact with it in certain situations.

    2. Does anyone have any advice on some AI logic for games like Brawl Stars? I know how to make AI for RPG games. Simple alert/attack range check and then changing the AI states. But in this case, it's a fast paced 3v3 game on a small map. Any idea?
     
  2. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
  3. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    Put your Jump Pad on a separate NavMesh layer and set them to a higher cost (this way the NavAgent will avoid the Jump Pad in most cases. You can also manipulate the cost of all the layers for each agent.
     
  4. UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    UDN_5c806b49-d8a0-4f67-a296-c12c91aa7396

    Joined:
    Jan 9, 2017
    Posts:
    152
    If it avoids, can I still tell my AI to move to it using a random timer to interact with it?
     
  5. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    Sure, you can either change the layer cost of the agent for the Jump Pa or set destination directly to the jump pad.
     
  6. Skynet766

    Skynet766

    Joined:
    Sep 13, 2020
    Posts:
    22