Search Unity

Question Should I stop my agent every time set a new destination point?

Discussion in 'Navigation' started by mariabou, Jan 10, 2021.

  1. mariabou

    mariabou

    Joined:
    Jan 10, 2021
    Posts:
    1
    Hi guys! Im searching in your channel a nice video where learn how to setup correctly states in unity. for example, im using in my project pluggable AI from unity learn, but my problem is, when I have to change destination point in my agent, should I move before my agent to idle state, set new destination and when path is completed move to patrol state? I have some times path invalid, or completed at same time as remaining distance as 0 and then becomes all errors, how can I set that correctly?
    So, I have different states, patrol, idle, attack, etc.. if I see player stop agent? set destination is different than when arrives to waypoint? because I do not use update for control, only an invoke for prevent excessive cpu usage, my target is mobile.
     
  2. NixyNick

    NixyNick

    Joined:
    Oct 11, 2020
    Posts:
    12
    I'm not really into C# but recently I bought an asset called "Ultimate AI System" and it somehow does everything. All I had to do was to assign some variable (speed, rotate spee, etc) and it worked. I also noticed that all the code is explained really well so you might learn something from it.