Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. 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. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    827
    Hello

    On your homepage the feature list says this about multilevel grids:

    So does that mean that bridges would not be supported? Or could they be done with multiple grids connected via portals?
     
  2. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    Hi c-Row
    If your level have overlapping geometry and you have to be able to navigate on both levels, a multiple grid setup is the way to approach this, if you need to be able to navigate from one level to the other, you can link the two levels with portals.

    Hope this is helpful, otherwise just let us know here in the thread or in our forum at http://apexgametools.com/forums/forum/apex-path/


    The Apex Team
    www.apexgametools.com

    Follow us and get all our news, updates, tutorials, etc.
     
  3. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    827
    Sweet - consider that a buy. :)
     
  4. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, i think i do not get it right. What i am trying todo is a simple MoveTo position and update it.

    SteerForPathComponent has already, an implementation of IMovable and a MoveTo method. It has an option for replanInterval, so i thought i could just call MoveTo in Update and it would handle the replan and move smooth to my set destination.
     
  5. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    116
    Hi,.. I am strongly considering a buy. I just need to clear up a few things first:

    1) Multi-terrains - I make all my terrains with multible terrain tiles inside Terrain Composer - how does that go along with Apex Path?

    2) To complicate it I just bought Sectr Stream - planning to stream terrains in to be able to have large, almost open world landscapes.... How would that work with Apex Path?

    3) Behavior Designer : How does it go along with Apex Path?? Would they overlap too much to make it reasonable for me to buy Apex Path - I'm a solo free time developer, so be honest ;-)


    One thing also? I would not suppose Apex Path could be used for any kind of flying AI, would it... being grid based and all...

    Thx in advance

    Jesper, Denmark
     
  6. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Have a look at the Moving Units and Path Replanning videos on the tutorials page.

    You most certainly do not want to call MoveTo in your Update method.
    MoveTo issues a path request and upon receiving the path moves the unit to its destination, you only call MoveTo once when you want to assign a destination to a unit.

    Replanning is what happens if something in the environment changes that may invalidate the path the unit is currently moving along.
     
  7. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I am afraid I cannot directly answer your question, since we have not and cannot test Apex Path for compatibility with all other packages available on the asset store.

    What I can tell you is that we support dynamic initialization, which means you can load and unload grids at runtime.
    So with regards to questions 1 and 2, when a given piece of terrain is loaded you can initialize the grid(s) on it, and when the terrain is unloaded you can disable the grid(s).

    I doubt there is any overlap between Behavior Designer and Apex Path, our product is a path finder not a behavior tree composer.

    And finally about flying. No I am afraid you cannot currently use Apex Path for flying, since that would require a 3D matrix.

    I hope this helps you in making your decision. If you need us to elaborate on anything, just let us know.
     
  8. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Well what about if i want to update my destination. Lets say if i want to navigate the unit to a destination that i grab from mouse input position that changes all the time. I could do a repath interval by myself that is not a problem, but my unit stucks and does not move smooth with an interval of 0.5 - 1.0 seconds.
     
  9. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Well even if you want your unit to constantly follow the mouse position, you should definitely do it at an interval, not every update, that would be a complete waste of resources. You can use the load balancer to schedule your set destination logic every 0.x seconds.

    I am not sure why you mention an interval of 0.5 to 1 seconds, it is entirely up to you to decide the interval.
    If what you are referring to is the replan interval, that has noting to do with this.
    If you are constantly guiding units around, you may even want to completely turn off replanning, by setting the mode to NoReplan.
     
  10. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    I m interested to buy this assets.

    I d like to know if can be used also with static pathfinding to simple crowd.
    Perfomance are good also with static paths?

    Thanks
     
  11. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Yes i know,i just thought that it handles this internal using replanInterval, know i see that replanInterval is something diffrent. I would still set my destination using MoveTo?
     
  12. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    HellFireKoder likes this.
  13. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes the correct way to move a unit through script is to call its MoveTo method.
     
  14. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Apex Path does not include crowd steering behaviors, nor flow field support, these are features that will appear in a separate product in the future.

    How big a crowd are we talking?

    With static paths, do you mean a path you lay out manually and have units follow, i.e. not using the path finder?
     
  15. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Good idea suggesting that.

    We have contacted the Playmaker team to hear about the possibilities, but have yet to get a response.
     
  16. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    I saw in one game, i think it was trine2, that the skeletons can jump down from a platform and climb up on the other side to hunt the player. The game is some kind of 2D, or 2,5D game with 3D optic.
    My question is, can i let i.e. an enemy do the same and or let him jump from one platform to another if it is not far enough? I would like to use this in a 3D game. Can i let an enemy climb up a ladder for excample in an fps game or let them climb a scarp slope if there was the same underlying mechanics like a ladder under it?

    I have bought some other pathfinding solutions cheap and more expansive and have to know what this can do better then the others and what i ask for are some things i want.
     
  17. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hi there!

    Promissing plugin! Is it possible to use it from JS# by moving scripts to plugins folder and so on, or could be used out of the box?

    Cheers!
     
  18. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    You can connect various sections of a grid or one grid with another using portals. Portals can be set up do do whatever you please, e.g. climb a ladder, jump a certain distance, etc., however you will have to implement this logic yourself.

    Do be aware that we have a limitation on our support for multi level geometry. If geometry at different heights overlap only one position will be walkable. E.g. with a single grid you cannot have a bridge that you can both cross over and underneath. To have multi level geometry you need to use multiple grids.
     
    Atmey likes this.
  19. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Apex Path is written in C# so yes you would need to follow the guidelines for using different languages in the same project.

    Also we some functionality that currently relies on the code being in the same assembly, one example is defining your own set of attributes. However we may change this requirement, but you can also just put these specific classes in the Plugins folder, of course you would need to define them in C#.
     
  20. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Thanks!

    One more question. The blocked cells by objects in the layer of obstacles are only computed on init, so if you move the object later the cells will remain blocked, right??

    And have you planned to add mecanim (with root motion) functionality for the agents movement?

    Cheers!
     
  21. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes static obstacles are only computed on init or on calls to the Update(...) method on the grid (not the Unity Update method) which updates part of the grid at runtime allowing for destroying or building otherwise static level geometry.

    So yes if you wish to block a cell even after the obstacle blocking it is removed, you can do so. You can also move static obstacles around and update the grid dynamically if that is what you want.

    We do not plan to include any predefined Mecanim locomotion since animations differ.
    What you can do is override the default method of locomotion to instead use your animations for movement.
    We are working on a video that shows exactly that.
    To see how locomotion is overridden there is an example of this called CharacterControllerMover in the Apex Examples/Scripts/Extensibility folder in the examples project.
     
  22. ohbado

    ohbado

    Joined:
    Aug 13, 2014
    Posts:
    37
    Hi!

    I bought Apex Path.
    However, example hopes for the simpler one. First of all, I want example of Path Finding that handles the character controller of the Unity standard.
    I want a simple passing from A point on Terrain to B point that is.
    Can you show a simple code that character controller GameObjectA of the Unity standard chase GameObjectB on Terrain?

    Thanks.
     
    Last edited: Aug 13, 2014
  23. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Nice! Thanks for the info. You have one user more! :)
     
  24. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The Examples project includes a locomotion override that uses the character controller ( Apex Examples/Scripts/Extensibility/CharacterControllerMover.cs), you can either use that as is or use it a a reference to write your own.

    We do not ship with additional AI behaviors such as Chase. A simple chase is moving towards the last known position of the target. You could also use this simple example as inspiration.
    We do provide a wide range of video tutorials showing how to set up a scene to achieve various goals.

    Hope that helps you out, otherwise let us know.
     
  25. ohbado

    ohbado

    Joined:
    Aug 13, 2014
    Posts:
    37
    Thank you for the reply.
    I tried simple example that you had linked.
    However, NullReferenceException happens when executing it.
    Please teach causing.

    NullReferenceException: Object reference not set to an instance of an object
    Apex.Steering.SteerableUnitComponent.Stop (Boolean stopComponents) (at Assets/Apex Path/Apex/Scripts/Steering/SteerableUnitComponent.cs:327)
    Apex.Steering.SteerableUnitComponent.Stop () (at Assets/Apex Path/Apex/Scripts/Steering/SteerableUnitComponent.cs:315)
    Apex.Steering.SteerableUnitComponent.OnDisable () (at Assets/Apex Path/Apex/Scripts/Steering/SteerableUnitComponent.cs:177)
    UnityEngine.Behaviour:set_enabled(Boolean)
    Apex.Steering.SteerableUnitComponent:Awake() (at Assets/Apex Path/Apex/Scripts/Steering/SteerableUnitComponent.cs:124)
     
    Last edited: Aug 13, 2014
  26. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    While what you are experiencing is a bug, the reason you experience it is that you have not properly set up your unit.
    Had you looked at the warnings in the console, you would see that you are missing a speed component.

    Now you can add all components to a unit manually, but until you know the exact ins and outs of each, it is highly recommended to follow the guidelines given in the documentation and video tutorials, namely to use the quick starts.

    So Add Component -> Apex -> Quick Starts, and select the Navigating Unit behavior that best matches what you want the unit to do.
     
  27. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hi,

    In the unity Pathfinding you can give a Vector 3 position and the navmesh will give you the nearest walkable position. This is a nice thing to prevent give positions on undesirable areas. Is this possible with apex? I have apex now but didn't tried yet. Another question: In my game, i only ask for the path itself(the positions list) and then i handle the movement and the other stuff by myself. So have you some example of how to calculate the path to a target position, get the resulting list of points and update the path if needed by code? This will save me time, but since i like to do this by myself, with the function names in the API documentation will be enough.

    Thanks a lot!
     
  28. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Bug on mobile platforms
    Version 1.0 and 1.1 both have a bug that actually affects all platforms, but most will see it on mobile platforms.

    In short the bug has to do with the initialization order of scripts, where the layer mapping is not initialized at the proper time.

    So to fix this until we release the next update, do the following:

    1. In Unity locate the following file, Apex/Scripts/WorldGeometry//LayerMappingComponent .cs and select it.
    2. In the Inspector, click Execution Order
    3. Drag the LayerMappingComponent script onto the Execution Order window
    4. Finally drag it to become the second item just after the GameServicesInitializerComponent.
    upload_2014-8-13_19-25-12.png
     
  29. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes on the grid you will find a method called GetNearestWalkableCell, which will give you what you seek. Although walkable means that the cell itself is not blocked, it does not ensure that a path exists to that particular cell.

    We plan on adding a new option in the next update that will allow paths to resolve to the nearest walkable cell if the actual requested path is not valid (blocked or otherwise inaccessible).

    Issuing a path request is explained in this post. We will also create a video on that subject at some point in the reasonably near future.
     
  30. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Thank you so much!
    Very helpfull! ;)
     
  31. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    I'm thinking of buying Apex Path, but have some questions I'm hoping the team can answer first.

    I'm creating a space strategy game which may use a x-z plane for movement, but will also possibly have multiple planes above and below this 'middle' plane for ships to navigate to. I'm guessing that the only way to navigate between the planes would be using portals, but would that mean I would need to create a portal at every point in a grid? Is there a better way to do this?

    Does Apex Path support manually creating waypoints?

    Using Apex Path, would it be easy to implement my own solution of turning with acceleration and deceleration towards the next point on the path, as well as acceleration towards the first point, and deceleration at the end point?

    How will your next product Apex Steer compare to UnitySteer? Will it work in a 3d space game world or only on a plane or terrain (for example, the formations, squads, and flocking)?

    Thanks.
     
  32. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Portals in their current form add quite a bit of overhead, therefore adding portals to all cells is definitely a bad idea.
    Now we are planning on introducing a new type of portal that does not act as a short cut, which will remove the overhead.
    However portals can span any number of cells, so you could create one portal that spans the entire grid.

    Regarding waypoints. If you mean the ability to define a waypoint graph instead of using the grid for navigation, then the answer is no. If you mean placing waypoints and have units move from one to the next, then the answer is yes.

    You can override both the locomotion and the turning logic for units. Arrival deceleration is already built-in to the path steering behavior.

    We have yet to compete the specification for Apex Steer, but it will include behaviors similar to Unity Steer and most likely more. However since Apex Path does not support 3D navigation nor will the steering behaviors, at least that is the current state of things.
     
  33. 4nn0y1ng_0r4ng3

    4nn0y1ng_0r4ng3

    Joined:
    Aug 13, 2014
    Posts:
    3
    Hi,

    I recently bought Apex Path and I’m trying to make a follow unit script, but I have a problem, the units get frozen when I use a 0.5 interval.

    I’m using MoveTo function but I think that should be other way (because using this method I think that the Load Balancing don’t work)

    Someone know how do this? I think that might be simple but I’m having problems.

    I only want that the units follow the player.

    Thanks in advance.
     
  34. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I am not sure what you mean by 'Units get frozen when I use a 0.5 interval'. What interval are you referring to?

    MoveTo issues a path request and upon receiving the path it navigates the unit along said path. So MoveTo is the go-to method to have a unit path find from A to B. And the steering is done through the load balancer, so I am not sure why you think the load balancer does not work?

    If you want a unit to follow another unit, you may want to use MoveTo to set an interception course and then once intercepted switch to an actual follow behavior. This post contains a basic example of a follow steering behavior.
     
  35. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I'm looking at Apex as it's currently on sale and unity navmesh won't cut it for my purposes.

    For my game, I require a very high degree of control over just about every aspect of the pathfinding. For instance, I would like a way to be able to bake some kind of lookup table for each grid space for my cover system (in a very similar fashion to what Killzone 1 did with their pathfinding waypoints). I'd like to be able to place points within an acceleration structure such as an octree for fast performance (as they can be queried for other purposes, for example like in Killzone where an AI can choose where to move to, where to throw grenades, where to lay down suppression fire, etc)
    Additionally, I'd like a way to be able to write a custom function to assign a score to nodes, for instance based on whether the node has line of sight to the AI unit's primary target, whether it has cover from nearby threats, whether an ally is currently using that point as cover, etc.
    Finally, I'd like to implement my own custom path following as my AI units will be essentially acting as a "bot" on top of a player character.

    None of these are things that Unity Navmesh allow me to do, and I'd rather not spend much time writing a custom solution. If Apex path allows me to do these things, consider me an instant customer.
     
  36. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
    Can this work with any AI? I've been trying to use it with Shooter AI but it
     
  37. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Not automatically, of course. You'd have to code the integration yourself.
    That said, good luck getting anything working with shooter AI. From what I've seen, it's a horrible spaghetti mess of a product which is incredibly hard to integrate with anything.
     
    HellFireKoder likes this.
  38. daeuk

    daeuk

    Joined:
    Mar 3, 2013
    Posts:
    67
    does it require unity pro?
     
  39. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Why would it?
     
    HellFireKoder likes this.
  40. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,841
    Hi,

    I have one question about the feature comparisson with Navmesh. In the site it states that Unity Navmesh does not have dynamic obstacle support.

    Doesnt Navmesh allow dynamic obstacles ? I dont have Pro so i cant tell, but tutorials state that you can have dynamic obstacles (with navmesh cut as option).

    I would like to clear this before i buy, since it would be the main reason

    Also when it states "dynamically changing geometry", does that mean procedural mesh support and Navigation mesh generation at runtime ? If so what is the overhead for this ?

    Thanks
     
  41. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Since Apex Path is grid based it is already a look-up table, which allows you to index directly into the matrix to find a cell at any position. You can of course build another look-up structure around it if you wish.
    In fact one of the main reasons we created this product in the first place, was to provide a solution of proper use to an AI.

    All nodes (or cells as we call them) have a cost property. This is designed for AI use and in addition to whatever else you would use this for in your AI evaluations, it is also used by the path finder.
    This cost is grid bound, i.e. the cost is not on a per unit basis. So to achieve per unit costs, they would need to be assigned for each unit before the AI evaluation runs.
    We will probably be adding per unit cost fields in conjunction with our AI packages, but that is some time into the future.

    While Apex Path includes a default Steering component for following a path, you are free to replace it with your own.
    You just write your own derived from a SteeringComponent and it will plugin with the rest of the steering.
     
  42. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Nope.
     
  43. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    You are correct, some Nav Meshes do have cutting as a way to support dynamic obstacles. But looking at it from a performance perspective, it is far more costly to do mesh cutting than for us to simply update whatever cells the obstacle occupies at any given point in time.
    Nav Mesh cutting also destroys the mesh over time, if you place and remove obstacles at random the nav mesh will be broken down into smaller triangles each time, essentially changing the graph each time. This does not happen in a grid based solution.

    Dynamically changing geometry refers to the ability to tear down or build up geometry at runtime and have the grid adjust to the changes. This is different from dynamic obstacles in that it relates to static geometry, e.g. you can tear down a wall and tell the grid that you did and it will update to no longer see the demolished wall as an obstacle.
    Such dynamic updates, along with most other things in Apex Path, are load balanced, so it will happen over a number of frames depending on the size of the change. In other words you are not going to see frame rate reduction.

    Now procedural terrain/mesh and dynamic grid generation at runtime is also supported.
    Procedural terrain just needs to be in place before the grid initializes so that does not even require dynamic initialization.
    Dynamic initialization however can be used to support large worlds where only some grids are active at any given time.
     
    Last edited: Aug 14, 2014
  44. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    You have not completed your question, so it is a bit hard to answer.

    You have however posted a question in the review section of Apex Path. For the record that is not the proper place to ask questions, we have this thread, our support mail and our forum for that. So if you could remove your question from the reviews that would be appreciated.

    As @PhobicGunner said, there is no automatic integration between Apex Path and Shooter AI.
    We have the API that lets you move AI units around, one of our video tutorials explains this, and there are other videos explaining other features.

    We are happy to help if a specific feature is causing you trouble, just let us know.
     
  45. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    DynamicObstacle.Toggle(false) should mean that any cells covered by the object should revert to their previous status right? I was doing that for a door (block when closed, block nothing when opened) but it doesn't work as I expected as after Toggle(false) the cells are still blocked.
     
  46. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    If you want to manually control a dynamic obstacle it is important that you set its updateMode to OnRequest.
     
  47. leon1985

    leon1985

    Joined:
    Jun 20, 2014
    Posts:
    5
    I really want it support new Unity 2D(xy-plane). could you please make it on the schedule ?
     
  48. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    I'm interested asset.
    this asset can move elevators field having 3 floor?
    elevators is moving platform.
     
  49. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    This is already something we are considering, but currently I cannot tell you if or when this will happen.
     
  50. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    We do not have an explicit support for elevators, what we have are portals for which you can implement the exact action you want, so you could make an elevator portal that will transport a unit in an elevator.