Search Unity

[RELEASED]Node AI - Pathfinding and AI for procedurally generated games and more!

Discussion in 'Assets and Asset Store' started by cmart, Mar 25, 2015.

  1. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi Hamesh,

    I think I see the problem. When you get an agent bouncing between two nodes like in the first clip, it is usually because there is a break in the node graph somewhere. Goto Node AI in the tool bar, turn on the graph, then update it. If all the nodes aren't connected, you are going to have behavior like this. The reason the ai in the second video finds his wayPoints is that he can see it, or he can see a string of nodes that can see his wayPoint.

    I noticed a couple of big gaps in the nodes in your video, like this for example:



    so in the part I circled, try putting a few more nodes in there. If you look at a node, you will see a "max distance" setting and this is how far a node will check for a neighbor. So go through your level and make sure anywhere a wayPoint is and anywhere a enemy can go, a node can be seen. This is what the demo scenes node graph looks like, for a general idea:



    Update your graph from the tool bar frequently when you are setting up your nodes. Every once in awhile, you will notice the graph looks jumbled up (like at the start of the first clip) but I believe that is just a weird unity bug. If you update the graph from the toolbar, it will fix it and give you an accurate representation of your graph.


    Hope that helps, and if you are still having problems send over a pic with your graph and I'll give it a look :)
     
  2. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi Curtis,

    I have had another look over all of the nodes and they all appear to be connect. In some cases I have used fewer nodes further apart and increased the max distance, in order to improve performance through fewer nodes. I have included a screenshot below of the updated node graph:

    Screenshot - 18 01 2016.png

    Please let me know if you spot anything that I haven't. I look forward to your reply.
     
  3. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi Hamesh,

    I sent you a private message. To anyone who is curious, I'll post the resolution to the problem once we figure it out, I just dont want to clutter the thread ;)
     
    Hamesh81 likes this.
  4. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Just wanted to drop a quick note on the issue Hamesh was having. Turns out it was due to nodes having different "maximum distance" settings. So to avoid this issue, make sure all your nodes have the same maximum distance setting.

    In the next update, you won't be able to set the maximum distance for individual nodes. There will be a "node manager" game object where you will set the maximum distance for all nodes.

    Speaking of which, the next update is currently in the works, and should be ready to go sometime in March. I will post the details soon, but there are improvements across the board. Better pathfinding, better performance, more enemy/agent styles out of the box and more demo scenes. Should be a good one :)

    Thanks for checking out node AI!
     
    Hamesh81 likes this.
  5. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Thank you for all your help Curtis. I look forward to the exciting new features coming in the update!!
     
  6. sydknee11

    sydknee11

    Joined:
    Jan 20, 2016
    Posts:
    3
    Hi Curtis!

    I wanted to know if you could enable wandering while using waypoints? I want my monsters movement to be random, but I also want them to go into specific rooms and "pause" for a certain amount of time. So say, if I set up 4 waypoints, can the monster pick a random waypoint and move towards it? Or maybe I could set this up with nodes instead? What would you suggest? If it can do this I'll for sure buy the asset XD I've been looking everywhere for a patrol behavior like this.

    Thank you for any help,
    Sydney
     
  7. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi Sydney,

    Random wayPoint selection isn't available out of the box, but node AI does support custom wayPoint scripts and includes a scene showing how to use them (in the example, you can press 1-4 to pick the next wayPoint to move to). But random wayPoint movement is a good idea, I think I will build that option into the update. If you buy node AI and send me an e-mail I can probably get that in for you pretty quick :)

    Also, in the update there is a new feature called "node Wander" where instead of wandering around randomly, agents will pick a random node and wander to that, which makes the wandering much smarter while still retaining an element of unpredictability. Whats cool is that you can pick a radius that the agent will wander to, and if the nodes it will wander to will change as it moves.

    So for instance you could have a agent that guards a specific area and never leaves it (except to chase the player), the set of nodes he can wander to will be decided at the start of the game and never change, or an agent can branch out and explore and the list of nodes he can wander to will change as he moves... or you could have an agent that could wander to any node in the entire level if you want :)

    Just to be clear, the update isn't ready/out yet, it will be finished sometime in March.

    Thanks for checking out Node AI, and if you have any other questions feel free to ask.
     
  8. sydknee11

    sydknee11

    Joined:
    Jan 20, 2016
    Posts:
    3
    Thanks so much! That sounds perfect! Node wander would be amazing. I'll be buying it in a few days when I get my paycheck XD I'm surprised more AI and waypoint scripts don't have that feature, honestly. I've tried out several and attempted to write additional code to do just that but have not yet succeeded.

    Thanks again for the quick and detailed response
     
  9. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Just wanted to leave a message about the Node AI update. It is taking longer then I expected, but it is going very well. I am not sure when it will be ready for the store, but if you are a current customer or buy Node AI, you can send me your e-mail address and invoice number and I can send you beta versions while I am still working on the update.

    Before I put it on the store I need to update the manual, update the video tutorials, update the store description/pictures etc. so there is a ton of stuff besides the actual code to work on, and I don't want to do that stuff until the update is 100%. ready. So until then, send me a message if you want to get on the beta list :)

    Some of the new stuff in the update:

    Node wandering - agents can wander between nodes instead of just random wandering/bumping into walls. Agents can also wander/patrol through groups of named nodes, wander among nodes in a radius(with optional raycast detection).

    strict nodes option - agents will follow nodes to there destination without taking shortcuts. Useful in many situations, but for example say you have a ledge and a wayPoint below it. With strict nodes off, an agent might jump down from the ledge if it sees the wayPoint, but with strict nodes on, the agent would follow the path to the ramp/stairs to reach the wayPoint.

    Node Manager - Using the node manager cuts load/graph generation times in half, and allows for more flexibility. There is an option to generate the graph on start, or you can call a function to generate the graph.

    Node Placement tool - this tool will let you place square node grids automatically. It features visual placement tools, lets you adjust the amount of nodes placed both width and height, spacing between nodes, raycast to check for suitable surface (for instance, if you only want to place nodes on terrain, you could use the "terrain" tag and it wouldn't place nodes on rocks/houses /etc.) automatically placement based on surface with adjust height offset, and height limit placement (useful for terrains, so you don't put nodes on peaks/etc).

    Lots of other small improvements/fixes as well.

    Thanks for checking out node AI!
     
    closetgeekshow and Hamesh81 like this.
  10. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Very much looking forward to this update. Is there an official ETA for release, and a documented changes list?

    Mark
     
  11. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi Mark,

    The release is very close (within a few weeks... probably sooner) and I am offering customers early access if they contact me at nodeaiunity@gmail.com . Just send over your invoice number and I'll put you on the list.

    The code is basically done, I am just wrapping up the demo scenes and cleaning everything up. Once I get that done, I will rewrite the manual, post new demo scenes, send out the early access package to customers and submit the update to the store. After that, I will work on new video tutorials, and post them as soon as I can.

    here is the list of updates:

    -New ai Behaviors: Node Wander, and guard.


    Node Wander allows an ai agent to wander between nodes. An agent can wander among all nodes in a scene, or grouped in several ways. You can restrict the nodes an agent can wander among to within a starting radius with optional raycast/collision check (good for keep an agent in one room, for example) or by using nodes grouped by name.

    Say you have a castle environment with watchtowers, you could assign nodes on those watchtowers to the "watchtower" group, and assign an ai to wander only among those nodes in the watchtower group.
    all node wander styles can follow a sequence, or pick the next node at random. For instance, if you weren't using any grouping or radius checks and set node wander to follow sequence, the agent would wander to every node in the scene in sequence.

    Guard mode sets an agent to not move until it sees the player. If it sees the player it will pursue, if it looses the player it will return to its guard spot.

    -Strict Nodes

    Agents will follow nodes to their destination without taking any short cuts. Useful in many situations, for instance to prevent agents from cutting corners.

    -Node Manager

    The way node AI handles building the node graph has been completely revamped. Now most settings are handled with the node manager, which allows for faster graph generation and more sensible integration into procedurally generated scenes.

    -Node Placement tool

    This tool will let you place grids of nodes with visual tools. You can restrict placement based on tags (say you have a scene with a floor, and walls. if you set to only place on objects with the "floor" tag it would ignore any walls) . You can also set a height limit that nodes can be placed, which is useful for terrains.

    -Advanced nodes

    There are two nodes now, the basic node and the advanced node. The advanced node allows great control of how it connects with other nodes, which makes building multi-height levels much more simple. Invisible colliders and the like are no longer needed. You can also make one way paths, say for instance a agent can jump down a wall, but not climb up it.

    -More demo scenes

    Including multi leveled/heighted scenes and a procedurally generated example scene.

    -Simplified and optimized code


    -Inspector tool tips for most settings



    I can't wait to get this update out, It is a huge improvement in my opinion :) can't wait to see what people think!

    Thanks,

    -Curtis
     
    Hamesh81 likes this.
  12. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi There,

    Just wanted to let everyone know that the Node AI 2 beta is ready for customers. Node AI 2 is a major upgrade, and brings big improvements across the board. If you have bought or buy Node AI, send me an e-mail with your invoice number to nodeaiUnity@gmail.com if you want to check it out :)

    The manual and tutorial videos aren't complete yet, I hope to have them done and the package submitted to the store within the next week. Til then, here are some new demos:

    Multi-level navigation demo

    Procedurally generated demo featuring Dungen(dungen sold separately). Node AI 2 does include a custom script for integration with dungen however.

    Basic Gameplay demo

    UFPS demo. UFPS sold separately. Node AI 2 includes scripts and instructions to easily recreate this scene.










    Thanks for checking out Node AI 2, if you have any questions or comments let me know!
     
  13. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    Is there local avoidance? If not, are you planning on adding it?
     
  14. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi There,

    There is local avoidance, but it is very simple. Agents will not get hung up on each other if they collide, they will brush past each other.

    If you have any other questions, feel free to ask. Thanks for checking out Node AI!
     
  15. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    I am loving this asset! Great work! This node based AI is very cool.

    I have designed a complex open wilderness area and want to use this asset to create prey/predator setup (i.e. the enemies are the prey and the player is the predator and sometimes visa versa).

    1. Is there a way to have the "enemy" avoid the player instead of chase? i.e. my player is the predator and the "enemy" is the prey for example

    2. Is there a way to have the ai avoid a suddent drop such as a cliff?
     
  16. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi, thanks for purchasing Node AI, I am glad you are liking it :) Id be happy to answer your questions.

    1. Not out of the box unfortunately, but that is a very interesting idea. I guess you could possibly disable an AIs chase mode, so it is always wandering, and maybe increase the wander speed if the player gets close to the AI, but all that would take some scripting, and might not be perfect... so node AI doesn't have that feature built in, but its a very interesting idea... I never really thought of that scenario. I will definitely keep it in mind when I work on updates in the future.

    2. yes, but only if agents are using strict nodes. With strict nodes on, agents will follow nodes one by one on their path towards their goal, but with strict nodes off, agents will take a shortcut if it "sees" a closer node, even if that closer node happens to be across a deadly cliff.

    For a good example of why strict nodes are needed for more complex level layouts, open up the "multiLevelDemo" scene and turn off strict nodes for the ai agent. In a level with no ramps/stairs or gaps to avoid, strict node is not needed, but if you do have ramps/stairs and gaps you'll definitely see the benefit of using strict nodes :)


    Hope that helps, and if you have any other questions, feel free to ask.

    -Curtis
     
  17. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi,
    is dungen scene included?
    I am looking an AI to use with that package.
     
  18. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi,

    Thanks for checking out Node AI. Just to be clear, dungen is NOT included with node AI. Dungen is sold separately. I am pretty sure you already knew that, I just want to make sure that it is obnoxiously clear for anyone reading this thread ;)

    Also, the scene I use for the dungen demo isn't included, but I do include a script for super easy dungen support, as well as some simple instructions to get it up and running with the basic dungen tile sets.

    When I built node AI, I built it specifically because I couldn't find any AI I liked that worked with dungen... Node AI has evolved a bit since then, but it was built from the very start with Dungen in mind :)

    If you do end up buying Node AI and have any trouble setting it up with dungen (or have any other questions), feel free to contact me at nodeaiunity@gmail.com .

    Cheers,
    -Curtis
     
  19. Denton99

    Denton99

    Joined:
    Sep 14, 2016
    Posts:
    1
    Hi,

    I've been looking for a multi-level pathfinding solution that works well with Unity's 2d systems like the 2d colliders, but I'd also be happy with a 2.5d solution just as long as X is left/right and Y is up/down.

    Does Node AI allow for multi layer pathfinding on the X/Y plane? Just to make it a bit clearer what I'm looking for, I want to have my enemies and player to be able to pathfind around different levels of pipes and have the option to jump between them and walk behind pipes behind other pipes!

    As an example, imagine the image below is the orthographic camera view showing the X/Y plane, and each of the pipes are on different layers and are distributed down along the Z axis. Each pipe has different enemies pathfinding on them and I want to be able to script the AI to jump from one level of pipe back to another and continue pathfinding... Is this behaviour possible with Node AI without too much difficulty or too many workarounds? Thanks!

     
  20. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi,

    Thanks for checking out node AI.

    Unfortunately my answer would have to be no. Node AI isn't very well suited for 2D style side scrolling games, and at this time doesn't support jumping. So in this case I can't recommend Node AI.

    But good luck on your project, I hope you find a more suitable solution :)

    Cheers,
    -Curtis
     
  21. HittmanA

    HittmanA

    Joined:
    Jul 27, 2016
    Posts:
    45
    Hey I need some help. Are there any video tutorials on how to fully set up NodeAI? I really want to use it but I can not figure out how to get it set up.
     
  22. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hey there,

    Thanks for purchasing Node AI, I'd be happy to help you out. There are no video tutorials at the moment, but in the root folder of the Node AI package there is a PDF instruction manual which includes a guide for setting everything up.

    If you get stuck on a particular step or you still can't get it working, please contact me at nodeaiunity@gmail.com and I'll help you get things up and running.

    Cheers,
    -Curtis
     
    HittmanA likes this.
  23. studio1h

    studio1h

    Joined:
    Jul 6, 2012
    Posts:
    31
    Hi Curtis,

    Does Node AI have a "flee" mode? In other words, is it possible to have the agents run away from the player?
     
  24. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi there, thanks for checking out Node AI.

    Node AI doesn't have a flee mode, best you could do is make the agents ignore the player. This is a feature I have been getting more and more requests for however, so I may build something like this in a future update... but for now, unfortunately there is no built in flee mode.
     
  25. studio1h

    studio1h

    Joined:
    Jul 6, 2012
    Posts:
    31
    OK thanks, but please add me to the list of people who would like to see this feature added!!

    : )
     
  26. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hey there,

    Just wanted to drop a quick note about a few Node AI things :)

    First, a customer recently contacted me about an issue with UFPS integration. I left out one very important step in the guide.. after you setup everything according to the guide, click on the "_NodeManger" gameObject in the hierarchy and drag "HeroHDWeapons" into the player slot.

    So if you are having issues with UFPS, make sure to double check that setting. Next update for node AI I will include that step in the guide, sorry for any confusion!

    Second, the demos on the store page still work, it is just a little odd. If you click on the demo and your browser wants to download the page, that is normal. Just download the page and open it in your browser and the demo will work. You can delete that downloaded page after you check out the demo. Dropbox must have changed something, sorry for the hassle :)

    Thanks for checking out Node AI!
     
  27. ivangarciafilho

    ivangarciafilho

    Joined:
    Sep 2, 2015
    Posts:
    27
    Hi.... i purchased "Map Magic a long time ago and the guys from "Apex Path" didn't make the work they should ...
    I would like to know if i would success with youtr asset on :

    1 Infinite procedural maps (Map Magic) i need this cuz the game is a survival and passes on a desert within a sandstorm;
    2 i have some flying drones within rooms and i would like to know if they would find their way up, down and even avoid pillars and furniture (all procedurally generated);
     
  28. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121

    Hi there, thanks for checking out Node AI.

    1) Unfortunately Node AI is not a good solution for big maps, as you have to generate a grid at the start of your game, and once you get over 1000 nodes (or so), load times become more noticeable, and with something like an infinite terrain, load times will be a big nuisance... so I can't recommend Node AI for that.

    2)Node AI does not support flying navigation, but it is something I have been curious about myself. I don't think it would be very difficult to build this in actually (at least for hovering/drone type objects. I don't expect I'll ever have proper airplane/jet style navigation), and I very well may develop something like that for a future update. No promises though, definitely don't buy Node AI expecting that anytime soon :) If anyone else would be interested in this, please let me know.

    So Unfortunately I would not recommend node AI for your game, but never the less I wish you good luck and I hope you find a solution that works great for you :)

    -Curtis
     
  29. ApexofReality

    ApexofReality

    Joined:
    Feb 14, 2016
    Posts:
    102
    Is this compatible with either easy weapons or rfps?
     
  30. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    I am not familiar with easy weapons, but as far as RFPS goes, are you referring to this package?

    https://www.assetstore.unity3d.com/en/#!/content/7739

    Because I do own that package, and I have personally used it with Node AI :) no "official" support yet, but I am planning it for the next update. So yeah, Node AI is RFPS compatible with some easy tweaks (similar in difficulty to UFPS), I just need to write up the guide. If you pick up node AI for use with RFPS please let me know, it'll motivate me to sit down and write the guide (and maybe even drop a quick update for support on the store while I am at it).

    If anyone else is looking for RFPS support, let me know!
     
  31. ApexofReality

    ApexofReality

    Joined:
    Feb 14, 2016
    Posts:
    102
    yes i meant that package and im intrested in your ai now its really neat and would work good for my rfps game
     
  32. ApexofReality

    ApexofReality

    Joined:
    Feb 14, 2016
    Posts:
    102
    Are you also aware that in the ufps demo that if you crouch they cant really see you? It might be helpful to others if you fix it
     
  33. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121

    Ah, I wasn't aware of that... Looks like I had the height offset setting too high, because the UFPS players collider height is reduced by half when the player crouches, so the enemies are looking right over his head.

    Two ways to fix this, 1. lower the height offset or 2. (and this is what I will add in an update) adjust the height offset setting based on rather the player is crouching or not. So in the future, the "ai_health_UFPS" script will have settings for "height offset standing" and "height offset crouching".


    Also, I am going to go ahead and write a little guide for RFPS. I will post it here within the next few days.

    Looks like I will have a small update for the store sooner then later. For anyone curious, here is what is planned:

    update for UFPS support
    RFPS support
    couple of bug fixes and performance tweaks (nothing major, just a little house keeping).


    Thanks for the heads up!
     
  34. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Just wanted to drop a quick note regarding UFPS and RFPS.

    I have an updated script available for the crouching bug in the UFPS integration, anyone who would like this early feel free to send me a message with your invoice number and I'll hook you up.

    I also have some scripts and a guide for RFPS, but it is VERY basic support at the moment. Setup is a little trickier then I anticipated, so I need to do a little more work before I put this integration up on the store, but if you are a RFPS user and curious to take a sneak peek, feel free to message me with your invoice number and I will hook you up.

    If you are new to Unity/coding and looking to use Node AI with RFPS, you may want to hold off until I have a more polished integration. But if you know your way around RFPS and unity, and aren't afraid of a little code, then it should be a good start :)
     
  35. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Hi cmart,

    Can this be used to generate nodes for a platform game with some instructions?
    eg. walkable nodes on ground tiles, jump nodes if certian clear space above ground tiles, walljump nodes on walls etc. Then it could link all the nodes based upon further instruction eg. Ground nodes next to each other or at a one-way drop or within certIan clear space from jump node etc?
    It would be a very busy graph with lots of crisscrossing but the AI would be able to pathfind quickly based upon the nodes it's allowed to visit eg. If it has the wall jump ability turned on.

    Examples of node grids for platformers:


    Can this asset also do local avoidance or do we need to handle that seperately?
     
    Last edited: Feb 10, 2017
  36. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Can we manually designate safe spots or procedurally place a prefab/node marked as safe?

    Then the agent can choose a safe spot in the opposite direction from the player and pathfind there. Of course the player could chase them and they keep finding alternate spots designated by the player or simply pick a random point far away.

    eg. If you had a cover system in your game you would mark cover as safe. If each cover had multiple sides you could pick the opposite side to the player or simply the farthest point to reach from a group of spots for a complex map.
     
  37. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi Cereal_Killa,

    Thanks for checking out Node AI. Unfortunately node AI is not designed for 2D games, and it doesn't offer that level of complex ai behavior out of the box, So I can't recommend Node AI in this case.
     
  38. ivangarciafilho

    ivangarciafilho

    Joined:
    Sep 2, 2015
    Posts:
    27
    With unity 5.6 upcoming version with realtime baked navigationmesh... what's Node AI planning for future versions ?
     
  39. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    I don't have any plans regarding it just yet, I'll have to get my hands on the realtime nav mesh and see what it is capable of, and then go from there.

    If Unitys runtime navmesh is super awesome, maybe I'll make a version of Node AI that works with the navmesh, and uses nodes just for wayPoints, points of interest, patrols, etc. while still maintaining the standard version of Node AI. I would most likely include both versions in the same package so people wouldn't have to pick and choose which version to get.

    So I'm not sure yet, but I am certainly looking forward to see what Unity has cooked up!
     
  40. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    I'd like to know
    how can I get the waypoint path based on the position of the target.

    I do not want to use the included movement scripts, I code my own.

    all I need
    is the path (array of transforms?)

    or the position of the first waypoint, the player/AI goes to (if the whole path is not accessible)
     
    Last edited: Mar 12, 2017
  41. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi there,

    With node AI you can get the first/next node on a path, and the final "goal" node on a path. The next node/target node is updated when the agent reaches its current target node until it reaches its goal node. There is no function built in to get an array of all points on a path, because the path is updated dynamically.

    Hope that helps, and if you end up buying node AI you can send me an email with your invoice number to nodeaiunity@gmail.com and I can tell you the variables to use if you want to get the first/next and goal nodes.
     
  42. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    sorry I missed the answer.

    I have bought it.
    okay, I'll email you.

    but I think this would be beneficial for all who use it, to have an example of barebones of the system.
     
  43. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hey everyone,

    Just wanted to drop a update about what is going on with node AI. In the last few weeks I have been testing Unitys new component based navmesh system, and I am pretty impressed! In fact, I am so impressed I have decided to transition Node AI over to that system for pathfinding.

    I should have the new version ready to go within a few weeks, complete with new tutorial videos and demos. The initial release will retain support for UFPS and possibly RFPS as well (although RFPS might have to come later. Some time this summer I will have proper RFPS support included).

    The initial release will be pretty close to older versions of Node AI in terms of functionality. The major difference is that now everything is dead easy to setup. The new system seems to work great with procedurally generated scenes, and a few demo scenes are included that show off the new features.

    Oh and of course I will still include the legacy version of Node AI for people that really hate navmeshes or really love nodes :)

    Whats nice is that with Unity now handling the pathfinding, I am looking forward to expanding the AI capabilities and providing more example scenes in the future. Right now the AI has a strong focus on action type games, but I have been thinking about cooking up a few sim style scenes, for example.

    So if you are reading this and thinking about buying Node AI, I would suggest you wait for the new version. Because the navigation systems are so different, there is no straightforward upgrade path between Node AI 2 and 3, so save your self a little hassle and wait a few weeks.

    Thanks for checking out Node AI!
     
    antoripa and closetgeekshow like this.
  44. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    Hey! Just picked up Node AI for use with runtime generated navmesh. Some problems here and there, but all is working.

    My biggest problem is crossing navmeshes, I thought I'd ask as you're probably better at this than I am! I'm rendering a navmesh per procedural terrain in an infinite world, so the monsters can't inherently cross over to other terrains. I'm doing:

    Code (CSharp):
    1.     void Update () {
    2.         if (forceTimer > 0) { forceTimer -= Time.deltaTime; }
    3.         else if (agent.isOnNavMesh && agent.remainingDistance < 0.5f && Vector3.Distance(destination.position, agent.transform.position) > 0.5f) {
    4.             forceTimer = 1f;
    5.             StartCoroutine(Bump());
    6.         }
    7.     }
    8.  
    9.     IEnumerator Bump () {
    10.         agent.enabled = false;
    11.  
    12.         Vector3 dest = Vector3.MoveTowards(agent.transform.position, destination.position, 1f);
    13.         agent.transform.position = dest;
    14.  
    15.         yield return null;
    16.  
    17.         agent.enabled = true;
    18.         agent.SetDestination(destination.position);
    19.     }
    It's ugly, but it's working for now. I was curious if you had a better suggestion? The main problem being that terrain navmeshes are not flat, so I can't just draw a link line across it. Mine are fairly low res, one pixel every 4 meters, so I could generate that with heightmap data but.... sounds bad. Loving the wander/chase logic. Thanks!
     
  45. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121

    Hi there, thanks for purchasing Node AI, I appreciate it.

    My first thought would be off mesh links, but I don't know if you have already looked into that. Here is some info just in case:

    https://docs.unity3d.com/Manual/class-OffMeshLink.html

    They don't need a flat surface to work, and you can use them with the old navmesh system as well as the new navmesh surface system. I am not sure how flexible they are in terms of manipulation after the navmesh has been built though. For instance, I'm not sure if you could move around the start/end points after the navmesh has been built (to account for the different heights of your terrain) but if you can, that might be a good place to start.

    But to be honest I don't have any experience trying to link terrains in an infinite world, so this is just my best guess. But if I was heading down that route, the first thing I would look into are offmesh links.

    Hope that helps, sorry I don't have a clear cut answer. If I come across a better solution I will make sure to post it here.