Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Apex Path v2.0 [RELEASED] - High Performance, Easy to use dynamic Pathfinding

Discussion in 'Assets and Asset Store' started by Reinholdt, Jul 16, 2014.

  1. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes we have full support for generated worlds, run time initialization and run time updates.
     
    Alverik likes this.
  2. cyberkada

    cyberkada

    Joined:
    Sep 28, 2009
    Posts:
    15
    Can Apex Path be used for local avoidance in a 3D space game? How to extend to 3D?
     
  3. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The path finding in Apex Path is strictly 2D on the xz-plane, however steering can be 3D.
    There is no built-in 3D steering however, unless you consider height navigation 3D, so you would have to implement your own custom steering components to plug into the Apex steering pipeline.

    This video explains more about custom steering component.
     
  4. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    @Geminior
    Hi, I bought Apex before, and I am checking if it can be used for my game.
    Is that possible to build a Apex grid on a curved surface? e.g. on a surface of a sphere or capsule?
    Suppose I want to build a game like Mario Galaxy.
    I want NPCs in my game can do navigations on curved surface like in this picture below.
    Mario_galaxy_navigation_.png
     
  5. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    As also mentioned in the answer above, path finding in Apex Path is strictly 2D on the xz-plane.
    So a half sphere can be handled, but not a full sphere as grids cannot overlap and y+ is always considered up.

    So unfortunately Apex Path does not support your use case.
     
  6. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    Understand. Thanks for your answering.
     
  7. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    I've been getting this error in a build (it doesn't happen in the editor):

    Code (CSharp):
    1. ReflectionTypeLoadException: The classes in the module cannot be loaded.
    2.   at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
    3.   at System.Reflection.Assembly.GetTypes () [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Assembly.cs:371
    4.   at Apex.LoadBalancing.LoadBalancerComponent.<ResolveLoadBalancers>b__3 (System.Reflection.Assembly asm) [0x00000] in c:\Development\Apex Applications\ApexGameTools\Source\ApexShared\ApexShared\LoadBalancing\LoadBalancerComponent.cs:124
    5.   at System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator14`3[System.Reflection.Assembly,System.Type,<>f__AnonymousType0`2[System.Reflection.Assembly,System.Type]].MoveNext () [0x00059] in /Users/builduser/buildslave/mono/build/mcs/class/System.Core/System.Linq/Enumerable.cs:1904
    6.   at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[<>f__AnonymousType0`2[System.Reflection.Assembly,System.Type]].MoveNext () [0x00089] in /Users/builduser/buildslave/mono/build/mcs/class/System.Core/System.Linq/Enumerable.cs:2584
    7.   at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[<>f__AnonymousType0`2[System.Reflection.Assembly,System.Type],System.Type].MoveNext () [0x0007e] in /Users/builduser/buildslave/mono/build/mcs/class/System.Core/System.Linq/Enumerable.cs:1837
    8.   at System.Collections.Generic.List`1[System.Type].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128
    9.   at System.Collections.Generic.List`1[System.Type]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65
    10.   at System.Linq.Enumerable.ToArray[Type] (IEnumerable`1 source) [0x00029] in /Users/builduser/buildslave/mono/build/mcs/class/System.Core/System.Linq/Enumerable.cs:2403
    11.   at Apex.LoadBalancing.LoadBalancerComponent.ResolveLoadBalancers () [0x00081] in c:\Development\Apex Applications\ApexGameTools\Source\ApexShared\ApexShared\LoadBalancing\LoadBalancerComponent.cs:123
    12.   at Apex.LoadBalancing.LoadBalancerComponent.OnAwake () [0x00000] in c:\Development\Apex Applications\ApexGameTools\Source\ApexShared\ApexShared\LoadBalancing\LoadBalancerComponent.cs:64
    13.   at Apex.SingleInstanceComponent`1[T].Awake () [0x00033] in c:\Development\Apex Applications\ApexGameTools\Source\ApexShared\ApexShared\SingleInstanceComponent.cs:26
    14.  
    While it doesn't stop me from using the pathfinding for my main character, apparently causes some agents using the Wander Component to be stuck.

    I tried deleting and reinstalling the package because maybe I had an older version of your DLL but the problem continues.
     
  8. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Building for what platform?
    Also may I suggest you use our forums instead as this thread is really unsuitable to actual support requests.
     
    MarStr likes this.
  9. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    Windows 64bit

    EDIT: ok, I think I fixed it. I had to change the Player Settings from NET 2.0 subset to NET 2.0. Now there's no error and the Wander component works correctly in the build.

    Is this mentioned in the documentation? I have to admit that I'm the type of programmer that skips reading a lot of documentation so maybe I missed it. If not then it should be added.
     
    Last edited: Oct 19, 2016
  10. ForgedChaos

    ForgedChaos

    Joined:
    Jan 31, 2014
    Posts:
    49
    Hi there!

    I have a few questions before we purchase.

    The first is there any type of trial or demo version we can use to see if it will meet all of our requirements? At the cost, I would hope so, but I also understand otherwise.

    Do you have any data on how large of a terrain the asset can handle or how many assets it can simultaneously control? I'm seeing some chatter about terrain must be sliced up so to control the number of active assets.

    Lastly, it seems the asset ties everything to x/z axis. Does that mean flying creatures are a no go or things like navigating within caves of a terrain?

    Thanks!
     
  11. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    We do not offer a demo since the product is full source code. We do have a ton of videos showing various parts of the product.

    The size of terrain depends on a number of factors so it is practically impossible to answer what the max size is in general. However somewhere in the range of 200x200 - 500x500 per grid.

    How many units can actively navigate also depends on a number of factors. We have a demo scene with 256 units navigating within a budget of 3ms per frame on a mid range pc.
    Using multiple grids is not related to the number of units, but rather to handling large worlds.

    Apex Path is tied to the xz plane so there is no support for 3D path finding.
    All built-in steering components also move units on the xz plane, however there is nothing preventing steering components to operate in 3D.
    So you can have flying, either simple RTS style where flying simply means navigating in a flying layer sitting on top of the ground layer. Or you can create steering that actually moves a unit off the ground and into the air.

    For caves there are some requirements.
    1. They must not loop around on themselves. Apex Path does not support multilevel geometry unless the levels are clearly distinct (e.g. the floors of a building).

    2. They must either be composites where the bottom part can be in the terrain layer so that the grid can initialize, or you will need to implement a custom IBlockDetector to provided the needed information to the grid.
     
  12. gserpen

    gserpen

    Joined:
    Oct 18, 2016
    Posts:
    5
    Hello, I have a few questions about Apex Path and Steer.

    1) You recently mentioned in this thread that pathfinding is deterministic but steering is not. Would it be possible to make steering deterministic by replacing every floating point operation in your code with fixed point (integer) and also replacing any physics.raycast calls with a deterministic physics engine ?

    2) Is it possible to mark regions in the terrain (not obstacles) like swamps, forests, etc. as walkable by only a select few unit types ? If the answer is yes, is it possible to change the cost of traversing these nodes ?

    3) Somewhere in your tutorial videos you mention that a dedicated pathfinding thread has better performance than a thread pool. Can you explain the reason for that, is it because you are spawning too many worker threads in your examples (more than the available logical processors) and overhead is reducing your performance ?

    4) What happens when you issue a pathfinding request to a group where one group member has been added to the group by the player at a later time so is located very far away, at another end of the map ? Would that lone member attempt to reach the group's vector field somehow or would the system issue a separate path request for that member ?
     
  13. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Well there are an extensive amount of floats, vector3s etc. that need to be replaced by fixed point equivalents.
    Even the path finder, while logically deterministic it is still based on floats.
    But the answer is yes you would be able to make it all deterministic, it will however not be a small task.

    Dynamic obstacles can be used to mark areas as blocked with exceptions based on enum attributes. The dynamic onstables need not have a visual representation, just some sort of collider (trigger is fine) to dictate the area covered.
    The grid also supports simple costs, but actual cost fields are not implemented. Costs will apply to all units.

    That is simply due to how it works in the Unity clr. Also thread pools will not work for all platforms.
    It is not due to spawning too many worker threads, we only ever use one. Path finding in Apex Path is sequential.

    For funnel vector fields its the latter, for full grid vector fields, well there is no group specific vector field. Of course that is how we have chosen to implement it. All parts of the steering can be replaced by custom implementations.
     
  14. gserpen

    gserpen

    Joined:
    Oct 18, 2016
    Posts:
    5
    Thanks for the reply.
    It is a little bit hard to represent an irregular area without using mesh colliders which I can only generate outside of Unity. It would be a cool feature if we could just click on the grid in the editor and tag a path node with a simple raycast . Are there any plans to implement cost fields in a future release ?
     
  15. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    While the only built-in solution is dynamic obstacles, you can you create own solution that mimick what dynamic obstacles do. One way is to create your own type of dynamic obstacle, since that will plug right into what is already there. Look at the ManualDynamicObstacle for inspiration.

    We currently have no plans to include cost fields with Apex Path. But the foundation is already in place so you can create your own cost fields with relative ease. Get a reference to the grid, get the cells you want to apply a cost to and do so via their cost property.
    You can also have a look at ICellCostStrategy if you want to implement a more advanced approach to cost management.
     
  16. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    77
    Hi, guys!
    We happily joined the forces of Pathfinders using Apex and are enjoyning wonderful system and code!

    Nowwe have the question, that was risen a year ago - can units of different sizes find different pathes. And here was the answer:
    Is this still on Roadmap or maybe this feature is implemented already?
     
  17. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Clearance has been implemented, although it does come with some limitations.
    The main limitation being that it does not work well with connector portals.
    You can get some more info on clearance here.
     
  18. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    77
    Thank you Geminior.
    Few other question appeared.

    Concept:
    We are trying to make space ships with small but noticeable inertia (in 2D space, XZ plane).
    Ships collide with each other, so they have to make some prediction of other ships' trajectories and avoid them.

    Questions:
    1) Is there a way to limit agent's turn speed and add linear inertion?

    2) If it works out for ship A, I believe, other ships will predict linear trajectory of this ship A based on its
    Instantaneous Velocity?
    With Advanced Dynamic Obstacles they will even predict unpassable cells taking into account ship's non-trivial shape?
    Illustration: http://prnt.sc/db61rj - other ships will see yellow ship's trajectory like this?

    3) With Advanced Dynamic Obstacles other ships see our ship A with its non-trivial shape. But the very ship A sees itself as a circle (when we are talking about clearence). It there a way to make teach it to behave like a rectangle, for example?
    Maybe there is some trick with adding additional agents to one ship?
    This is less important, but would be great if possible.

    I apologize if some of these questions are trivial or are covered in some lessons.
     
  19. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The unit's acceleration capabilities control its ability to change both speed and direction (velocity), so lowering the acceleration on the Speed Component will increase inertia.
    A unit's deceleration works similarly for stopping the unit.
    Apex Path comes with a very crude avoidance implementation, but yes if that is enabled units will attempt to avoid each other. For proper unit avoidance you would need Apex Steer.
    Using dynamic obstacles for units is not supported, as there are there are multiple problems with doing that.
    1. Avoidance by replanning is generally a bad idea and extremely taxing on the path finder.
    2. Units will try do avoid themselves unless excluded, which would mean that each individual unit would need a specific enum value associated with them.

    Also there is no need for it as avoidance steering handles it.
    I am afraid there is no support for non-circular radii.

    Lastly, for future posts, please use our forums as this thread is not very well suited for it.
     
  20. vertigostudios

    vertigostudios

    Joined:
    Oct 1, 2012
    Posts:
    101
    Was looking to purchase Apex path recently and Im starting to get confused and have mixed feelings

    Licensing, on your site you have perpetual and personal addition, I know this if for Utlility AI. However, I dont want to purchase something and then be told that the licensing has changed to suit our companies sale model...

    and finally, Im no coder and have no intentions to be, Im a modeller and texture artist. So with that said, after looking at a lot of your assets forum pages, I see row after row of code examples which is very off putting? do I need to be a coder in order to use your assets.
     
  21. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    On the last day of the Sales Bonanza (thankfully it's finally over) I wanted to get a pathfinding solution. I had to decide between A* and Apex. I really had no idea what I'm getting into. However, there were some criteria that finally helped me decide:

    * A* has a demo version while Apex doesn't.
    * A* has good videos while Apex has a lot of videos, but seriously that guy only talks, I don't see action, that's very annoying. I certainly may want to get into the details later, but first I have to find out what it can do at all
    * Apex has Advanced Dynamic Obstacles which is another asset you have to buy and made me think why that isn't an update for Apex Path and I have to pay even more
    * Apex uses a license server. I'm using unity and don't want to depend on some license server that may or may not be accessible

    So I decided to buy A*.

    This is only an information for you to help improve, because from what I read Apex Path sounds to be superior to A*. But seriously, look at the video the A* guy did with the bots. There's nothing like that in Apex, even though it may even be possible, easier possible and more performant. I hope this information helps improve your videos and strategy when it comes to demos. I may switch to Apex at some point, but first I'm going with the other one.

    ps: If that information is a problem for you on this forum, please do let me know and I'll delete it.
     
  22. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Apex Path does not require coding unless you want to extend it with your own steering components or do larger customizations that go beyond what can be done by tweaking the many properties on the built-in components.

    There is no license server involved with Apex Path, nor will there be, but even if there was it wouldn't change anything.
     
  23. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    That is true. With a full source product you cannot provide a fully working demo. So the choice is between a free version with limited functionality that doesn't actually do the full product credit or nothing.
    The majoity of our videos are tutorials meant for the owners of the product and are based on our examples project included with the product.
    They are not intended as promotional videos.
    Instead of bundling everything in one package we allow the customer to decide which packages are needed, instead of bundling it all and increasing the price for all.
    We are a business, and as such we do need to charge for the products we create.
    Apex Path has seen a ton of updates with new functionality over the years, but we don't just add completely new and isolated functionality for free.
    Apex Path does not use a licensing server, and even if it did, our licensing only applies to editor mode and only prevents usage of the product if the license cannot be verified for an extended period of time.
     
  24. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    77
    As a guy who used both of these projects I can say that Apex is indeed superior.
    It takes less than half of the day to make basic RTS pathfinding and behaviour, and it took us 2 days to teach our units to turn with finite turn radius - thing that A* didn't allow us to do at all (although we might haven't researched this enough).
    Apex Steer comes with a great solution of group behaviour, which doesn't work right out of the box in case of A*

    Also in my opinion Apex Steer video is a promo itself - I've never seen such smooth behavior in other pathfinding systems.

    Lastly, you better have nice tutorial videos and bad promo-videos than vide versa.
    Generally, my opinion is that A* is somewhat obsolete and, unfortunately, you haven't read enough reviews in both Apex and A*. Don't buy assets for great promo-videos, man =)
    Don't get me wrong: A* is a great product and will help you a lot. But it is in development for 5 years, its version is 3.8.6 - I'm afraid you can't avoid over-complication in code and even documentation.
    Apex is superior even without its plugins, and with them you can make almost everything.
     
  25. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    About the "Game World" size can It be really large like 50,000x50,000? or there will be issue.

    I have a big world and need to use pathfinding on the every inch of my map! is that possible?
    Thanks.
     
    Last edited: Dec 17, 2016
  26. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    You cannot represent a world that large with a single grid, but you can use multiple grids where only a few are active at a time as explained here.
    If you want the entire world to be navigable at the same time, i.e. be able to issue a path request from one end of the map to the other, then Apex Path is not the solution for you.
     
  27. ivangarciafilho

    ivangarciafilho

    Joined:
    Sep 2, 2015
    Posts:
    27
    Nice to know after i spent my money on it... and you should specify It on your Asset Page, everyone looks for an Asset other than Unity Navmesh just to go full procedural ... i could'n t use that with Map Magic which proceduraly generates my maps...

    I Would ask if it's possible to make my flying drones navigate upwards and downwards within a Room avoiding pillars, furniture and everything else since i noticed that your grids just have params for z and x axis;
    I Generate Randomly my rooms, so i can't predict their final design, i would like to know "how i could deal with it" (even with work arounds) ...

    Aron's Astar project allows you to move a grid with your AI and allow it to navigate accross a small terrain scan without losing frame rate (100x100 nodes grid with nodes of 2x2 meters) changing and scanning every 50 meters from previous update and at 100x100 nodes over about 2 seconds...

    I tryied already to reproduce that mechanic .... however ... i can't exceed more than 100 cells on apex path without frying the CPU ... what should i do to optimize it and mimic Astar's project solucion ?
     
    Last edited: Jan 20, 2017
  28. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    With regard to multi-level terrains and portals is it possible to have different actions when approaching from different heights or from different ends of the portal?

    ie. moving from low to high requires a jump, but moving from high to low only requires a drop.

    Even if the terrains do not overlap is it best to use a separate grid for the upper section so we can use connectors instead of shortcuts? Being that shortcuts have a higher overhead and connectors can't connect two points on the same grid.

    At what point does creating more grids become less efficient than to start creating shortcuts, if any?
     
  29. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    Quick question for you guys: I have Apex Path and I love it, but how do you plan to adapt it to the landscape once Unity introduces runtime NavMesh generation (5.6 I believe)? I love load balancing, but I also love native engine support. Are we going to see an Apex Path 3.0 that leverages runtime NavMeshes?
     
  30. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    There is no built-in way of determining this, however since you get the portal that is entered as an argument to the action's Execute method, you can put in some logic there to base the action on the from cell, e.g. if it is higher than the destination or whatever.

    There is a third portal type Basic that you can use. It works similar to connectors, but does isn't limited to stitching grids together.
    We have no numbers on that, you will have to experiment. Often you don't really have the option since grids cannot overlap. They can be stacked on top of each other, but their bounds cannot overlap.
     
  31. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    It is highly unlikely that we will release an Apex Path 3.0 with Nav Mesh support.
     
    antoripa likes this.
  32. fieldrequired

    fieldrequired

    Joined:
    Feb 26, 2014
    Posts:
    108
    Hey there, great product but i'm really having trouble with step detection, in this case the transition from a road to a sidewalk. Even when the units are on the sidewalk they don't like to drop onto the road. The units just seem to slide against the drop as if it's an obstacle.

    I have 'Global Height Navigation' enabled and I've even tried setting the Max Climb and Max Drop to some pretty obscene values to no avail. The sampling mode is set to Raycast as I need to preserve memory.

    Help please it's driving me mad!
     
  33. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Hi @fieldrequired,

    From the information provided I can't really see what can be the cause.
    Have you ensured that the road is in fact seen as walkable by looking at the grid gizmos in Accessibility mode?

    Perhaps you can create a small video showing the problem.
    Please create a post on our forums and link to it there.
     
  34. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Hi! Can Apex Path drive vehicles, like tanks or jeeps in rts?
    I'm struggling to make unity's built-in navmesh to do it with no luck up to this point (their movement do not look anything like natural, strafing and stuff).
     
  35. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The default setup is aimed at humanoids, so you will need to adjust a number of settings and most likely you will want to create some custom steering components to specifically handle vehicular movement.
    It should also be noted that avoidance, clearance etc. is based on a radius, which can be a poor fit for vehicles since they tend to not fit in a circle.
     
  36. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Hi! Thank you!
    Circular avoidance is ok, until vehicles are just too long, its ok to have some space on a sides.
    That steering component, how hard would it be? I mean, is it clear on what to rewrite/extend/inherit in Apex Path to do it?

    P.S. Just as side note, I'm generally very surprised that there is no vehicle navmesh agent nor in default navmesh, nor in the any of the asset store's ones.

    This leads me to a question is vehicle units movement is not supposed to use navmeshes at all? then what about RTS units?

    Maybe I'm just going a wrong way with this?
     
  37. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Apex Path is highly extensible so writing new steering components is in itself easy.
    Obviously the actual steering logic can be as simple or complex as needed to match the use case.

    The reason we haven't implemented behaviours specifically for vehicles is that is is practically impossible to write some that are of general use. Each game has it own demands regarding how units move. This applies to humanoids as well of course.
     
  38. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Than you! It really looks easy enough to customise. Will go with Apex.

    One more question - is there a solution to pathfind in 3d space? like space sim enemy ships finding paths between asteroids?
     
  39. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Pathfinding in Apex Path is done exclusively on the xz plane, so 2D only.
    You can do 3D steering however.
     
  40. fieldrequired

    fieldrequired

    Joined:
    Feb 26, 2014
    Posts:
    108
    I have an area in which the player can build dynamic obstacles on. The area is not set to automatically initalise.

    The grid is disabled until enemies are spawned within the game area, but when the first enemy is spawn grid.Initialize() is called. For some reason, the dynamic obstacles are not detected when the grid is initialised (well they are not shown on the grid visualiser at least,) but if I toggle the dynamic obstacles on/off in the editor they become correctly registered.

    Is there some way to force the grid to update and detect the dynamic obstacles?
     
  41. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    A dynamic obstacle will not initialize if not placed on an active grid.
    To make it update on demand, e.g. after you have initialized the grid, you have two options.
    Either call ActivateUpdates(0.01f, false) or Toggle(true) on the dynamic obstacle. The former is preferred since the latter will do a small allocation.

    So you will need to keep track of the dynamic obstacles placed while the grid is inactive and activate them using the above methods.
     
  42. RecursiveRuby

    RecursiveRuby

    Joined:
    Jun 5, 2013
    Posts:
    163
    Hey, so I'm strongly considering purchasing Apex Path as well as Apex Steer and before I do I was wondering how would you go about implementing a path agent for something like an Airplane. I've watched a large amount of your tutorial videos already and it definitely seems dynamic enough that it is something that could be implemented and I have a few ideas but I wanted it to run it by you first.

    So most agents would just move towards the next point. Where with a Airplane you want a banking angle since it can't really just instantly turn around like any other agent could. So my idea was to create a steer component which would clamp the desiredAcceleration from performing too hard angular turns. Would this be an appropriate means of achieving what I want to do?

    Also I would want the planes to avoid crashing into each other so it would need a decent form of avoidance. Which I guess is where Apex Steer comes in? Although would Apex Steer work well enough to incorporate the delayed angular turns? I assume if you just increased the search radius it would have enough time to react.

    Also just to note that all the Airplanes would be flying at the exact same height so 3D avoidance is not required. The typical setup for how Apex Path works is just fine. Its just the banking angle I'm concerned about.
     
  43. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Answered here.
     
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Can Apex Path work in 2D orthographic mode? I want to use it in a 2D game with no height data at all, but there could be dynamic 2D obstacles and the need for seeking toward the player.
     
  45. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I am afraid Apex Path is 3D only, it is married to the xz-plane.
     
  46. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I just purchased Apex Path, and I'm having trouble figuring out how to set it up quickly.

    I see tons of youtube videos, but am having a hard time finding written documentation. The manual is only 5 pages that are any use, and don't really explain much of anything. I'm not into youtube videos & much prefer written text.

    I am also having a hard time finding out how to scale the grid to fit my game, which is 1 PixelPerUnit.

    My game has two level types. The first are Large Procedural maps, which are tile based. Tiles are 2560x2560 units, but that's not all that large since my PPU is 1. (a 2560 pixel square tile takes about a few seconds for the player to move across). The second types are premade static levels which are very small (about 2x10 tiles). The tiles have nothing more than a BoxCollider (2560x2560 units) & a SpriteRenderer. I also need the obstacles to be determined based on their MeshCollider. I didn't really understand how obstacle shapes were determined.

    With Unity, it was very simple. Add a NavMeshSurface & have it automatically grab the BoxCollider to generate a navmesh, set the obstacle layer for my trees (detecting its MeshCollider) or setting up NavMeshObstacle with a box shape. Then just add NavMeshAgent to a character, and SetDestination() - wallah! Incredibly quick setup after reading the docs & tuts for a few hours.

    I read Apex path is very easy to setup as well. I usually just open the manual of an asset store asset & can figure things out quickly. I did the "Quick Start" to add a GameWorld & map the layers the same as I had in Unity Navmesh. Simple enough, but then the manual just ends there. I have so much more I need to do, but don't know where to find the written docs.

    I took a look through the apex components, but there's an overwhelming amount there & I can't even find where to read about each component. I'm beginning to immediately regret my decision to purchase the asset. I don't want much. I just want to add a navmesh to my perfectly square tiles, bake, and then just have it work whenever I instantiate the tilemap. I thought this was what I was going to get, as it was advertise. I don't have very many obstacles in my game, and only need pathfinding for my PC and a few wandering NPC's (very few unit/entities ever needing to calculate paths). I just need to have the character move in a straight line to the destination on a flat world, but navigate around obstacles. Right now I don't need all the extra complexity - I figured I'd just dig into that later, if I ever need.
     
    Last edited: Oct 13, 2017
  47. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    We chose from the start to use videos for documentation, so you are correct that there are no written how-tos.
    We do have full API documentation included with the product, you will find it along with the examples project in the documentation folder. The API docs are mainly for finding more info on a specific type to e.g. extend existing functionality.

    I suggest you watch the videos on getting started and how the grid works.
    The quick starts will add all that is needed for a unit to navigate the scene, but you do have to ensure that obstacles are in the Obstacles layer, terrain (meaning whatever the unit are supposed to walk on) are in the Terrain layer and optionally that units are in the Units layer.

    Apex Path is grid based, meaning that obstacles either block an entire cell or they don't. The actual shape of an obstacle is irrelevant.

    If there are any features that you can't get to work, let us know. Please post on our forums, as this thread is not suited for actual support.
     
  48. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Couple of feature questions.

    - can you define a margin/edge around obstacles? To keep agents from getting to close to abrupt edges.

    - Along the same lines can you have the system check slope at more then just the center? My maps have a lot of abrupt edges and transitions to other geometry where only doing center checks can result in stuck agents or agents going off ledges.
     
  49. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Apex Path is grid based, it is not a Nav Mesh and as such it does not generate itself around obstacles.
    Obstacles either block an entire cell or they don't.

    Obstacle detection is not limited to center checks, you can set any sensitivity you want, e.g. you can block a cell if is is only slightly overlapped by an obstacle.
     
  50. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Being grid based doesn't preclude having margins around obstacles. Also I was more interested in being able to check the slope at say a specific radius from center at several points.

    With the right geometry without these kinds of checks, then funnel algorithms tend to lead to paths where agents get stuck or fall off edges.