Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    129
    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:
    129
  3. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    199
    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:
    129
    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:
    199
    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
unityunity