Search Unity

Dynamic AI Project[Navigation Released]

Discussion in 'Assets and Asset Store' started by brilliantgames, Oct 13, 2012.

?

Should the Navigation be available as a separate purchase?

  1. No, keep it exclusive to Dynamic AI.

    34 vote(s)
    23.0%
  2. Yes, I am only interested in the Navigation in this project.

    53 vote(s)
    35.8%
  3. Yes, but I also want this to be compatible with Fantasy AI

    61 vote(s)
    41.2%
  1. Shintaja

    Shintaja

    Joined:
    Jan 13, 2012
    Posts:
    15
    Why do you not simply give the DynamicObstacle to characters and implement a way for the characters who have the DynamicObstacle ignore the changes made by the component but the others won't ignore it unless it's their own component, which would result in a rather decent character avoidance?
     
    Last edited: Jan 24, 2013
  2. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Well it wouldnt be good for performance having every single AI constantly updating the grid as well as pathfinding. As well they would have to constantly check if the obstacle nodes near their paths are caused by themselves or others. A few other potential problems would be that they wouldnt be able to predict the movement of the other character, so they would still likely run into eachother often. There is a really simple solution to character avoidance I discovered. Place a triggered collider in front of the AI. When it collides with another AI or tagged character, simply have it turn the opposite direction. The thing that makes this really neat, is that fact that when 2 AI run into eachother, its very likely they will both turn the correct direction.
     
  3. marcaurelio74

    marcaurelio74

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hi,
    if i create a grid on a terrain, the tree will be calculated as non walkable area or i have to do it manually?
    Thanks
     
  4. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Unfortunately Unity engine does not initialize tree colliders until game time. This is part of the reason I added the "Create grid at start" feature. So doing this would just increase your load time a bit depending on your grid size. Or yes you could do it manually.
     
  5. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Please reupload the DeDust2 Demo or as project for this pack!!!
    I want to know how you made the bootcamp soldier to an FPS help!!! SAVE ME
     
  6. Xinity

    Xinity

    Joined:
    Oct 10, 2012
    Posts:
    5
    Hi, is Dynamic AI Navigation tested against Flash builds?
     
  7. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    Do not help this user, he is a pirate. Ask for invoice proof.
     
  8. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    I apologize for my absence on these forums, I have been away for a while. I have not tested on flash. I do not see why not. :)
     
  9. Kryptex

    Kryptex

    Joined:
    Jan 5, 2013
    Posts:
    8
    I'm a little confused, in a post above I read that Axis Height is no longer there, but in mine it is. When I open the store window in Unity to see if I can update it, there is no new version. Am I missing something? Also...I can't seem to get this thing to work properly, even after tinkering with it all day and watching/re-watching the videos. :( I'm sure this is something on my end, but I just can't figure it out. When it doesn't work for me I get "Path Failed." When it does work for me, the character will either spin in circles at certain points or just go back and forth between the target and what seems like a random location. I have all of the components on properly on each object, so I can only assume it has something to do with my grid settings, or how I'm clicking to move the target to a new location. (It's odd though that sometimes it will work, and if I change one little thing, it stops working altogether.) I'm just frustrated and confused.

    I've figured out some of the issue. The character was for some reason sinking as he would travel, and that was causing his "last known node" to get stuck, and thus draw a long red line from here he is, to where he was. (He would then eventually leave his path to go back to this point.) All I had to do was create a script to give him a constant Y-axis value, and it solved this problem.

    Another issue that I believe I have fixed is the character actually creating a path to my movable target. My script was simply setting the position of the target, and this was for some reason not updating the gridposition script on it. All I did to fix this was make the target move very quickly to its new position.

    So that's 2/3 problems solved. The last one that I have, is that the character likes to take a VERY tight path to the target, and when he has to travel around corners will get hung up on the corners. When this happens he will spin for a while, (or sometimes forever), and then moves on like he should. So far I have no clue how to fix this, as I have tried to change the cube/capsule size. It would almost be better if he didn't take such tight corners on his path. Anyways, any help would be greatly appreciated!! :)

    Here's a video that shows my problem. (I also show my settings in the inspector just in case)
    http://www.youtube.com/watch?v=lg7PXfmmjP8&feature=youtu.be

    Just because I have a deadline tomorrow what I did was just took your obstacle course scene, copied all the components that I needed, and brought all of my other stuff back in. Seems to work fine in your scene, so it HAD to be one of my settings/numbers/etc. Now that it's working, I am very happy with the product, though I would still kinda like to know what I was messing up.
     
    Last edited: Mar 11, 2013
  10. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hey, you are using the beta version. But great news! I just submitted the new version this morning! Just waiting on approval, hopefully your issues should be cleared up on this new version. Also, you mentioned your character taking tight paths. This is because your cube size or capsule size is too small.

    Rob.
     
  11. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  12. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  13. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    you sure know your stuff, will buy it
     
  14. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thanks! For the people who already own this. Let me know your thoughts on 1.1 so far. :)
     
  15. Fifth_Moon_Games

    Fifth_Moon_Games

    Joined:
    Dec 10, 2012
    Posts:
    3
    Update seems to work great for me so far. Using it with Fantasy AI.
    Good job and thanks for the hard work.
     
  16. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    No prob. :)
     
  17. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    Just bought this and Fantasy AI, and I love them both.
    looking forward for any updates / assets you can make.

    Thank you
     
  18. Mementos

    Mementos

    Joined:
    Sep 25, 2012
    Posts:
    79
    I will buy it when the combat system is ready to use =) Looks very impressive so far! Good Work guy!
     
  19. Kryptex

    Kryptex

    Joined:
    Jan 5, 2013
    Posts:
    8
    I would gladly pay an extra 10 bucks just for an avoidance prefab of some kind :) I have tried using the 2 cubes in front on both sides, and it half-works. The character will rotate and alter the path a small amount, but also move half-diagonal. It's better than nothing, but I would love for full character/ai avoidance to be implemented :) (unless there is a better way to do it!! if there is I would <3 you if you told me! :p ) Keep up the awesome work!
     
  20. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    The latest update does have simple character avoidance. ;)
     
  21. Kryptex

    Kryptex

    Joined:
    Jan 5, 2013
    Posts:
    8
    Hmmm, is there an additional script for it? I'm not seeing anything, and I have updated. (You've got me excited though! :D )
     
  22. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Its in the AI script. You will see the "obstacle tag". Anything with that tag they will avoid when they bump into it. Its a very simple avoidance script, and was I bonus I wanted to include. :)
     
  23. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Hi,

    I'm a new user and have a question about dynamic obstacles. I have rigid body objects that have the Dynamic Obstacle script on them. When I move them, I can see the non-walkable area underneath them update according to where they move. That's fine. However, their original location says red (non-walkable) and AI's path find around it. Am I doing something wrong? What am I missing?

    $Capture.PNG
     
    Last edited: Mar 22, 2013
  24. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    It looks like you didnt assign them to the 'Dynamic Obstacle' layer, or 'Ignore Collision' layer. See your building a grid over them and they are seen as an obstacle so you will get a permanent nonwalkable footprint.
     
  25. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    This looks great, I do have a question before I buy,

    Does it currently have the ability for the enemies to dodge and hide?
    If not,when do you plan on adding them?

    Thanks,
     
  26. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Right now only 'Dynamic Navigation' is available. 'Dynamic Navigation' is a powerful pathfinding solution, there is no behaviour yet. However 'Dynamic AI' is my next priority. 'Dynamic AI' will be an add on to 'Dynamic Navigation', so you can't really go wrong in purchasing 'Dynamic Navigation' at this point. :)
     
  27. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    So Dynamic Navigation 1.1 is finally here. And to reward those who waited, it is now on sale! Grab a copy now and find out why Dynamic Navigation is the most powerful pathfinding solution for Unity!

    Get Dynamic Navigation 20% off for a limited time! This sale is only on till the end of the month!


    Asset Store Link: http://u3d.as/content/brilliant-game-studios/dynamic-navigation/3FZ


    Forum Thread: http://forum.unity3d.com/threads/154639-Dynamic-AI-Project-Navigation-Released




    View attachment 48009
     
  28. Kryptex

    Kryptex

    Joined:
    Jan 5, 2013
    Posts:
    8
    I'm sorry, I still can't get this to work. I have placed a capsule as a child object under my enemy npcs, and assigned that obstacle tag to them. No avoidance occurs. Do the colliders need to be triggers? Do they need the gridposition script? Do they need a certain layer too? I also checked out the AIMove script, and at least mine has nothing about obstacle avoidance. (and my version of the package is the most up to date version) I feel stupid -___- Thank you for your help. (Your product is fantastic by the way, and I am happy that I purchased it.)
     
  29. Zen-Davis

    Zen-Davis

    Joined:
    Aug 14, 2009
    Posts:
    285
    The lack of a response looks very bad. :(
     
  30. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Sorry for the delay, I was gone for the weekend. This code is built into the AImove script. Just simply check off the 'Enable Simple Obstacle Avoid', then below you will see the 'Obstacle Tag'... The default is 'obstacle'. You give all your AI this tag and they will walk around eachother when they run into eachother.

    Did you not see this happening in the new demo scene included?
     
  31. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Apologies. I respond as fast as I can.. I work full time, I'm usually gone on weekends, plus I have 3 other products on the Asset Store, and several threads. I do my best.
     
  32. Kryptex

    Kryptex

    Joined:
    Jan 5, 2013
    Posts:
    8
    This is odd, I will try to update the package again, as I do not have the option to check off 'Enable Simple Obstacle Avoid.' I hope that doing that fixes it :(
    '
     
  33. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yeah it sounds your update did not work correctly.
     
  34. Kryptex

    Kryptex

    Joined:
    Jan 5, 2013
    Posts:
    8
    I re-updated and that fixed it. I have no idea why it wasn't working, but I have the option now. Is the capsule/cube size tied to how the AI avoids? (By the way, thank you so much for your patience and support. I really appreciate it.) :)
     
  35. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    No. The simple character/obstacle avoidance is very simple, it operates strictly within the AIMove script and is dependant on collision occurring.
     
  36. thekill473

    thekill473

    Joined:
    Aug 26, 2012
    Posts:
    9
    Hey, this probably gets asked a lot. But does this package work in the free version of unity?
     
  37. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    Hello Mr. Brilliant. Could you add an option or utility to query whether a point (given as a Vector3) is reachable at the given time by the navigator?

    I'm implementing and integrating Steering, and for wandering, I want to make sure I can get to a random Target before assigning it (otherwise ill choose a new one!).
     
  38. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Has this package support for playmaker?
     
  39. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes.

    Well until I do add that you can ask, 'If(SlowToStop){'}. This means the navigator has not found a path to his destination. Right now a game object with a 'GridPostion' script is required to target a target location. The reason for this is so that the algorithm to calculate the targets location is only calculated once by the target itself. Otherwise if there were multiple AI targeting the same target, they wouldn't all be calculating its grid position.
     
  40. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    All the needed variables are public, so yes. :)
     
  41. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    My character is walking into the hill its supposed to be walking over. How do i stop this from happening? Thx.
     
  42. Mustafa Adil

    Mustafa Adil

    Joined:
    Dec 6, 2012
    Posts:
    21
    $errors.jpg

    how to get rid from these errors?
     
  43. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Into the hill? Like passing through it with no collision? Are you using a character controller or a rigid body?



    Either the animation you have assigned does not exist, or the animation assigned does not belong to the 'Character To Animate'.
     
  44. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Can you remove the "s" in the "http://"? It causes chrome user to not be able to play unless they remove it manually. Its due to the source not being secured and therefore chrome blocks it when the webpage claims to be all secure.

    Edit: I had one soldier jump off a small cliff, is this correct AI or an error?

    ~lanDog
     
    Last edited: Apr 21, 2013
  45. Mustafa Adil

    Mustafa Adil

    Joined:
    Dec 6, 2012
    Posts:
    21
    yes it finally works now =)
     
  46. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes this is setup to happen. This is showing off 'navigation portals'. You can use them for jump-able areas, elevators, ladders, ect..
     
  47. chillersanim

    chillersanim

    Joined:
    Mar 31, 2013
    Posts:
    219
    Looks very impressive.

    Is this script usable in an openworld game with dimensions about 8x8 km?
    Perhaps is there a possibility to combine multiple grids together and only load some of them (like a LOD)?

    Greetings
    Chillersanim
     
  48. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes with a bit of creativity this is possible. I am doing right now. :) I created several large grids that overlap eachother by about 100 yards, then made a simple script that figures out which grid is the closest to the player, and assigns that grid to the players gridposition script, and every single AI's grid position and navigation scripts. If the AI that are farther than 100 yards away, are disabled anyway cause its an open world game. I will likely be releasing the multi-grid script soon for free. :)
     
  49. Beyerdynamic

    Beyerdynamic

    Joined:
    Dec 9, 2012
    Posts:
    27
    I'm impressed. :eek:

    But before I part with my hard earned cash :D Will the AI work with enemies in a 3D maze? I'm after an AI so one monster can wander around then when the monster see's the player all hell is let loose. :)

    Neil.
     
  50. lebid

    lebid

    Joined:
    Nov 17, 2012
    Posts:
    30
    News about this script ???