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. b1gry4n

    b1gry4n

    Joined:
    Sep 11, 2013
    Posts:
    146
    any update on the apex path 2.0 release?
     
  2. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    We are still working on it, there are a few persistent bugs with height navigation that we are still working to sort out.
     
  3. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    HI, team.
    I found four errors in UnityWrappers.cs on Unity5. Thank you for any help you can provide.

    Assets/Apex/Apex Path/Scripts/Services/UnityWrappers.cs(174,34): error CS0619: `UnityEngine.Physics.minPenetrationForPenalty' is obsolete: `use Physics.defaultContactOffset or Collider.contactOffset instead.'

    Assets/Apex/Apex Path/Scripts/Services/UnityWrappers.cs(175,27): error CS0619: `UnityEngine.Physics.minPenetrationForPenalty' is obsolete: `use Physics.defaultContactOffset or Collider.contactOffset instead.'

    Assets/Apex/Apex Path/Scripts/Services/UnityWrappers.cs(194,34): error CS0619: `UnityEngine.Physics.maxAngularVelocity' is obsolete: `use Rigidbody.maxAngularVelocity instead.'

    Assets/Apex/Apex Path/Scripts/Services/UnityWrappers.cs(195,27): error CS0619: `UnityEngine.Physics.maxAngularVelocity' is obsolete: `use Rigidbody.maxAngularVelocity instead.'
     
    MikeTon likes this.
  4. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Just comment it out, or alternatively run the associated t4 file if you are using Visual Studio.
    Apex Path 1.2.5 does not support Unity 5 (as you have noticed) but Apex Path 2.0, soon to be released, will.
     
    syntystudios likes this.
  5. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    I have a few questions to see if Apex can suit my game's needs.
    1. Can paths for upwards 100 units be calculated within 100ms (simultaneously)?
    2. How big of a performance impact will this cause?
    3. Can Apex be run under fixed timestep?
    4. Also, can Steer be modified to use doubles instead of floats for better synchronization across multiple platforms?
    Number 3 and 4 are very important to my project because I'll be using a lockstep system that relies on synchronous simulations.
     
    Last edited: Feb 13, 2015
  6. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    1) Unless the paths are very short, the answer is no. The time it takes to complete a path request is dependent on both the length of the path and the obstacle density.

    2) Path finding is done on a separate thread so frame rate wise it has no performance impact.

    3) We have not done any testing of this, so I am afraid the most likely answer is no.

    4) Everything in both Apex Path and Apex Steer use floats since most of the logic involved has to do with positioning based around the standard Unity Vector3s. So to adapt to doubles you would need to do this conversion yourself.
     
  7. MikeTon

    MikeTon

    Joined:
    Jan 10, 2013
    Posts:
    57
    I am having this issue too. Commenting it out leads to more errors unfortunately.

    -Mike
     
  8. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Thanks for the honest answer. I've heard good things about Apex so I was really hoping it could suit my project but it's okay it doesn't. Anyways, I hope you guys the best.
     
  9. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Just comment out the bodies of the functions / properties, not the actual functions / properties. Alternatively you also have to comment out the signatures on the interfaces, e.g. IPhysics.

    You can safely do either since these functions / properties are not used. These wrappers are simply there for the purpose of unit testing.
     
    MikeTon likes this.
  10. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    Great!
    and try to comment out and work now.
     
  11. timothy-s-dev

    timothy-s-dev

    Joined:
    Nov 7, 2012
    Posts:
    5
    Just to be clear, there is no difference between using Apex Path in Unity Free vs Unity Pro?

    [Edit]: Also, is there a timeline on version 2? Unity 5 support would be quite useful, but only if it's relatively soon, at least for this project.
     
    Last edited: Feb 17, 2015
  12. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes Apex Path works the same in both versions of Unity.

    We aim to release Apex Path 2.0 next week.
     
  13. timothy-s-dev

    timothy-s-dev

    Joined:
    Nov 7, 2012
    Posts:
    5
    Will upgrading to 2.0 be free, or will it be a separate asset/package?
     
  14. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Hmmm, I didn't find the solution for WP8 problems with 1.2.5 version.

    You said earlier, that replace NETFX directives with UNITY_WP8.

    Ok. Done. BUT! When compiling for WP8. Compiler doesn't regognize "using Windows.System.Threading".

    So, what now?
     
  15. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes the upgrade to 2.0 will be free.
     
  16. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Unfortunately WP8 is just a major pain. I will have a look at it again of course, and hopefully it will be fixed before we release Apex Path 2.0 later this week.
     
  17. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    Apex Path 2.0 RELEASED

    Apex Path version 2.0 contains lot's of improvements, new features, even better performance, bug fixes and Unity 5.0 support.

    It also contains preparations and support for Apex Steer!
    We are releasing Apex Steer approximately 12 March 2015. it might be earlier ;-)

    Changelog: Apex Path v 2.0 feature update.

    New Features:
    • A new Upgrade Scene menu item is available, which will upgrade scenes made with older versions of Apex Path to this version, adding and replacing components.
    • Unit interaction is now done through a IUnitFacade, please watch the tutorial videos for details.
    • Added a UnitsSelectedMessage, which will be posted when units are selected.
    • The height navigation options are now set per scene or per unit instead of per grid, through the new Navigation Settings component available on the Game World.
    • Height sampling and navigation now provides 4 options. Generating and using a height map or no height at all are still present.
    • New are ray cast and sphere cast. Both new options do not generate a height map and hence take no memory for this, instead they do real time height sampling.
    • Grouping of units via selection or otherwise has changed completely, see the tutorial videos for details.
    • All Apex Components are now consolidated by the Component Master, to reduce component clutter.
    • Unity 5.0 support.
    Improvements:
    • The ZeroHeightMap now returns negative infinity instead of pos.y when sampling a position, since a zero height map represents no height.
    • Moved various path finder settings to its own component which is shared among those that use it.
    • Grids now have an option to select the method used to detect terrain and obstacles, this is mainly due to a Unity bug where the default CheckCapsule will fail in certain scenarios.
    • All registered units in a scene can be retrieved via the GameStateManager (through GameServices)
    • Various extension to existing data structures and a couple of new ones
    • Numerous tweaks to existing components.
    Breaking changes:
    • Steering has changed completely, watch the tutorial videos for details.
    • The INeedPath interface now only requires a single method to be implemented. All unit related data is passed to the request by way of the 'requesterProperties'.
    • The CallbackPathRequest constructor no longer requires unit data such as radius and attributes, these are contained in the new required 'requesterProperties' property.
    • The path finder options of a path request are now consolidated in the pathFinderOptions property
    • Removed the speed index property from the HumanoidSpeedComponent since it is not an optimal way to control animations as it does not reflect the actual speed of a unit.
    • Off Grid Navigation is no longer an option since it works poorly with groups and is just generally not useful.
    Bug Fixes:
    • Fixed yet another bug with WP8 and WinRT.
     
  18. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    One of our new Apex Path 2.0 tutorial videos
     
  19. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    When I tried to update my project to unity 5 I removed Apex and then got the latest from the asset store today but still get red errors. This could be my own doing but it seems like Apex currently just has red errors . Latest Unity, Latest Apex.

     
  20. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    @MattyWS I as well

    Changing both the UnityWrappers.cs and I believe it was the MovingComponent.cs to Physics.defaultContactOffset resolved the errors for me. (you will get this error after resolving the one in the UnityWrappers) I have not tested things out as I am waiting for Apex Steer but I believe things should work then.
     
  21. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes unfortunately we released Apex Path 2.0 just a day before Unity released version 5.0 final.
    And it had changes that were not in the beta we tested against.
     
  22. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Apex Path 2.0 Hot Fix

    The release version of Unity 5 had a few changes to the Physics class that were not in the beta we tested Apex Path 2.0 against, so you will receive a few errors when using Apex Path 2.0 with Unity 5.

    To resolve this, please go to the Products Window under the Apex -> Tools menu and check for updates.
    There is a hotfix patch available, just click 'Patch It' and it will be fixed.

    If that fails due to the catch 22 of the project not compiling so no menus show, get the hotfix from here
     
    Last edited: Mar 6, 2015
  23. rokitkrk10

    rokitkrk10

    Joined:
    Jul 21, 2014
    Posts:
    4
    the off grid navigation is the main reason I bought the apex path finding asset. Is the feature completely removed from the 2.0 version?
     
  24. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes since it actually did not work and hadn't worked properly for a long time.
    Making it work properly again is not a quick fix, so we decided to disable it until we have the time to look at it properly, provided anyone is actually using it.

    Units can still move when they are off-grid, but the whole move from one grid to another via off-grid has been disabled.

    What is your use case? Perhaps you can simply use portals and achieve the same thing you did before?
     
  25. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Can't be true... When it start to "work" on WP8, then something else happends.

    Right now my units walk in y-direction very strangely. And they fall, even they are over collider cube. y-direction seems to change every time, when I give a new navigation position.

    And... how to h*ll I can turn TOTALLY visual grid off. It is visible, even I remove all "Show xxx" booleans. With earlier version, which didn't work with WP8,. I haven't any problem with 2000*2000*gridsize5 nav grid (multiple grids By grid tool), but now my FAST Computer totally freezes... When I deactivate Grids component from hierarcy, Computer wakes up. And if I can believe Profiler, I believe it is "visualising problem". Gfx.waitforpresent shifts up from 20-30% to 65%-75%. Not acceptable at allo_O (What I googled... trying to draw data for GPU too fast. CPU have to wait, since there isn't fifo buffer between CPU & GPU?)
     
    Last edited: Mar 9, 2015
  26. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Some tests:

    Win 8.1, Unity 4.6.2f1. Problem seems to targeted Gfx.waitforpresent. Ok, is it bug on win or Unity. No.

    Virtual Win XP sp2 under Win7 (yep, just for teasing myself)... forget

    Win7. ->Gfx.waitforpresent
    WinXP SP3 -> Camera.RENDER!!! Grids unactive/active 14% -> 70-90%

    So, camera will see (as I see this grid too, even in play mode) it -> Unwanted rendering...
     
  27. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I am afraid I can't tell you what is going on with the y-movement you are seeing, you will have to provide more details, and send a support request to support(at)apexgametools.com.

    Turning the grid visualizer off is as simple as removing it, that is why it is a separate component.

    Regarding WP8, our support for that goes as far as ensuring that the code compiles for that platform. We are not able to do platform specific tweaking and testing.
     
  28. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    I will check it tomorrow. Too tired right now.

    Ugh. I mean. Turning OFF THE GRIDS GAMEOBJECT. Can't do, Needed for navigation. Hmmm. Got an one Idea! You use gizmos for showing all portal lines. There are MANY in my world :)... let's test one thing.

    YES! Turning off gizmos for Portal did it! 60FPS with all candys, Smoke of war renders etc... :)

    I will test it tomorrow too when had some sleep, but as you said, now there isn't any compiling errors. A very good start point for tomorrow. Good night for now ;-)
     
    Last edited: Mar 9, 2015
  29. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    No I am not suggesting you turn off any game object, I am saying that you can simply remove the grid visualizer component if you never want to see grid visualizations.

    Well Gizmo drawing is highly inefficient, so yes the framerate drops when many gizmos are drawn, its almost as bad as Debug.Log. So don't do performance testing with gizmos active.
     
  30. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    Thanks for all the feedback, it is really a great help and appreciated!

    Apex Path 2.0.1 RELEASED

    New Features:
    • Steer for Path now has a Strict Path Following property to control how it follows a path.
      This is on by default, which produces behaviour identical to before.
      If toggled off the unit will proceed on its path if it passes by its current target path node, regardless of distance to it.
      In short this means that if it overshoots it will just proceed. A video will be produced to show the effects of this.
    • A new ManualDynamicObstacle is available to allow custom blocking of areas.

    Improvements:
    • Changed dynamic obstacles to use the grid's obstacle sensitivity by default.
    • Added additional options for runtime grid updating.
    • A number of new example scenes with matching tutorial videos (a few videos are still in production)

    Bug Fixes:
    • Apex Component Master failed when removing components.
    • Corrected the internal version marker so the product window no longer state an update is available, when it is not.
    • The Mixed Mode for Obstacle and Ground detection on the grid is now actually mixed mode...
    • Some fixes regarding prefabs and Apex components
    • Fixed some Unity 5 issues
    • Fixed a tool-tip issue

    Known issues:
    • Cell sizes less than 1 cause issues due to how costs are integer based. We have added a warning about this instead of capping the size to minimum 1, since some may have simply written their own cost provider to fix this. It should be noted that this issue is not new to 2.0.
    • There a are a few issues with height navigation, mainly to do with box collider units and aligning with elevation.
      Units also do not stick perfectly to the ground on slopes.

    The Apex Team
    www.apexgametools.com

     
  31. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    I found a reason for odd elevation aligning.

    Apex should not set game object's elevation before navigating starts.

    Example problem:

    I have a Fisher man, who stands inside fisher's house.
    This Fisher house stands with wood legs aprx.1 meter over
    the terrain level. So, the Fisher man's elevation at start is 1 meter.

    Clear?

    Apex Unit component ground offset have to be 0 for navigation purposes.

    Now we have a problem!

    Many game types like mine, have alot animations. My Fisher man have too.
    When he goes to fishing, he walks out from his house, climp down on stairs
    to ground level, gets his fishing pole and fish bucket. And all of these
    are done By animation. When animation ends, the game engine gives
    navigation unit.MoveTo(x) command.

    So. Apex should not set an elevation before navigating really starts.

    And Apex have to RELEASE elevation control after navigate ends.
    Otherwise my Fisher man is hanged By house floor again.

    Could you add a radiobuttons or switch to Unit Component like:

    Constant ground offset / Only onNavigation ground offset.

    Then this suits for all!

    I would like to modify apex By myself, but future Apex updates
    makes it worthless.
     
    Last edited: Mar 9, 2015
  32. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    About APEX & WP8

    It works great!

    So, only elevation issue must be fixed By Apex. Then I'm satisfied :)

    EDIT:

    And elevation offset should be adjustable to negative values too!

    I bought a many premade character packs AND height level offset seems to be anything
    between earth to moon. It will be a huge amount of work to fix those characters one By one
    By hand :-(

    Still. Apex works fine with WP8 :)
    Later this evening I will try android phone too.
     
    Last edited: Mar 10, 2015
  33. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Just make the house floor belong to the terrain layer, problem solved?

    It doesn't have to be, but yes for a human a ground offset of 0 would make the most sense, since only a select few people can hover.

    Thing is that navigation starts the instance the unit is loaded. The unit may not have been given a navigation order, but gravity is always in effect. So it is not a question of Apex Path fixing the unit's starting elevation, it is simply gravity doing what gravity does.
    Now it is true that we do correct the elevation at start-up but only if the unit is embedded in the ground, i.e. we only ever correct upwards.

    You can switch of gravity by setting it to 0, either permanently or temporarily. You may in fact want to disable the SteerableUnitComponent on the unit while your animation plays.

    The offset is seen from the bottom of the collider. Making it negative would mean burying the collider in the ground, which is not desirable.

    For future reports / request like this, please use the forums instead, since this thread becomes unmanagable real quick
     
  34. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    Aww what happened to 12 of March Steer release? I was looking forward to it! :)
     
  35. beit

    beit

    Joined:
    Mar 5, 2015
    Posts:
    24
    Hello,

    your tool look like the one I'm looking for :D
    Do ApexPath support the native 2D system that unity introduce?
    So would I be able to make it work with a sprite/2DCollider based system?

    Cheers,

    Beit
     
  36. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I know, we are too. However we don't want to release before we are fully satisfied with the product, and we aren't there yet. I know it is super annoying that we have postponed the release a few times, but we are working out the last known issues and we are very close.
    Its not that we aim for total perfection as that is utopia and there will be some performance tuning and other tweaking to be done after the initial release, but we have a few known issues that simply are not release worthy.

    I am reluctant to set an actual date, but my best estimate will be by the end of next week.
    Again I apologize for having to postpone once again, but hope the reasons given above make sense.
     
  37. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I am afraid we do not support Unity 2D. We may release a version for 2D some time in the future, but it is not currently on our road map.
     
  38. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! I'm facing a challenging task, and will appreciate any help on it. I have 2 patroling guys, and I need one of them to move at 200% speed. If I pause first guy after 10 seconds, and second guy after 5 second, I want them to end exactly at the same location.

    For the second guy, I multiply all the speed values inside HumanoidSpeedComponent. But after 10 second pause, their position is a bit different (about 1 meter), and it is more different, the more waypoints I have set along the way.

    I deduct, that second unit needs to, maybe, turn faster, because waiting time near the waypoint is set to 0. But no matter how I look through the code, I can not find any variable I could multiply by 2 and make that speed multiplication perfect.

    I'll be happy to hear any advice on where could I potentially look for variables to adjust further. So far I suspect SteerableUnitComponent, but tinkering with it doesn't seem to work so far.
     
  39. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Ok so a few things to note. The first is that the HumanoidSpeedComponent is just one implementation of IDefineSpeed so you can quite easily make your own implementation if you want something a bit more advanced.
    The documentation and example project shows how to create speed components.

    The next thing to note, which is most likely what is causing what you are seeing, is that when a unit is told to wait, it will slow down to a stop. However it will not stop in its tracks. By default it slows to a stop in 0.2 seconds. This is done respecting the units deceleration capabilities, so if it has a speed that will not allow it to stop in 0.2 seconds using its max deceleration, it will not stop in 0.2 seconds but as soon after that as it can.

    If you want your units to stop dead in their tracks when asked to wait (or stop) then you should set the Stop Time Frame on the steerable unit component to 0 and set its max deceleration to a high value.
     
  40. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Thanks a lot for the reply! During patrolling path, unit never stops, so unfortunately altering 0.2 to 0 never helped. I can see there is also 'slowdown' before reaching endpoint, but I tried to disable it completely, and it has no effect. My next idea is, maybe I need to 'pick up' new targets faster i.e as process is likely async, it takes more time for unit to proccess new point, which maybe results is slight delay. Well, I have full day ahead, will try to figure this out. Seems like, unfortunately, you do not have out-of-the-box answer :)
     
  41. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Ok it seems I misunderstood pausing to mean calling Wait. So all you want is to make sure that if two units start from the exact same position and are told to move to the exact same spot, they arrive there at the same time, and hence if one unit is at double speed it will arrive in half the time.

    This will be the case, if you look at movement isolated. However as you suggest yourself, issuing path request infers a delay, even if it is not done on the main thread. This will mainly be noticeable at the start of a route, since waypoints along a route will be resolved in time to be ready for use when the unit moves on to that waypoint.

    Acceleration also influences this. If you only double the speed of the unit but don't increase its max acceleration (and deceleration) accordingly, it will not actually cover double the distance in a given time frame.

    I am still not sure what your exact use case is, but you might want to play around with issuing a path request manually and then pass it on to the units.
     
  42. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    First of all I have to say that I have a hard time understanding exactly what it is you are trying to say here.

    The reason I suggest that you use our forums for support requests is that if you experience a problem with Apex Path it is likely that others will experience the same issue, or have the same questions etc.

    This thread however is just one long thread and it is hard for people to find answers here.
    Having a separate forum entry for each problem or set of questions benefits other users as well.

    If you feel that you have not had a proper response to your questions, that is of course unfortunate.
    I do believe we have left no questions unanswered, but I may have misunderstood some questions. As you say English is not your mother tongue, nor is it mine, so misunderstandings can happen.

    I suggest that you try to clarify each question that you feel has not been answered.
     
  43. Cripplette

    Cripplette

    Joined:
    Sep 18, 2012
    Posts:
    66
    Hi, Does your asset works on WebGL ?
    Regards
     
  44. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    We do not have specific support for WebGL, but there should be no specific support needed since Unity does the conversion.
     
  45. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Any update on the release of Apex Steer? Been really looking forward to this one.
     
  46. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi, I have been studying this system for the past few days. I have watched through the majority of the videos and this seems like a fantastic asset so well done. I am curious whether this system would work for my particular use case.

    I am developing a stealth game and so much of the AI is dependent on moving through multiple level buildings and being able to seek a target through building interiors. The building models used for the game have the interiors split by level with the exterior shell being one piece for the entire building. I assume that the AI navigation through the interior could be achieved as shown in this video:

    However what if I needed to have AI units able to climb the outside of the buildings as well, could this be possible? This would work like a ladder on the side of the building, and therefore if a unit is chasing a target outside the building and the target decides to start climbing to the top of the building, the AI unit would be able to slowly climb to the top as well.

    HousePathfinding.PNG

    Using Apex Path, the only solution I can think of is if there was one grid on the ground around the outside of the building, another covering the entire roof of the building, and then a portal somehow used to allow the unit to "climb" from the ground grid to the roof grid. My concern though is would the exterior climbing functionality interfere with the interior multilevel grid systems, or could they be made to work together. Eg. Starting outside, an AI unit seeks a target by climbing the exterior wall of the building and then proceeds to follow the target down the top flight of stairs into the upper floor interior of the building and continues following through all the levels of the interior. Or the opposite, eg. AI unit follows a target from the building interior climbing flights of stairs all the way to the roof of the building, where the target decides to climb down the side of the building to escape and the AI unit continues to follow climbing down after them.

    I'm looking forward to your advice :)
     
    Last edited: Mar 23, 2015
  47. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes we are almost ready for the initial release, it should happen within the next couple of days.
     
    Ghosthowl and Hamesh81 like this.
  48. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes well you actually nailed it yourself :), how you imagine you would do it is how I would suggest you do it.
    The only thing that could cause issues is the ground level. I would suggest you just have one grid there which covers both the interior and exterior, since grids cannot overlap height wise.

    Connecting the ground to the roof via a portal is straight forward, and the AI will pick that route if it sees it as the shortest between itself and the target.
     
  49. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Ok so if I used the Portal Action None Component for example to link the ground and top floor portal into a "ladder" would this component automatically handle a smooth vertical movement (not teleport) between the two portals? Or would I need to code my own portal action component? Also, lets say that the climb between the ground portal and the rooftop portal was not a completely straight vertical climb, eg. let's say there is a balcony in between them. How would I ensure that the unit climbs appropriately over the obstacles instead of either being stuck under the balcony or simply continuing in a straight line through it vertically?
     
    Last edited: Mar 23, 2015
  50. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    While it is true that such a portal simply makes the unit continue its path and therefore the unit will climb the building if its height navigation capabilities let it.
    But that is the problem, because you most likely do not want your AI unit to be able to climb 30 meter vertical faces in general, you only want them to do that at the drain pipe (or similar).

    So you will have to write your own portal action that actually transports the unit up the drain pipe.
    This also allows you to control the animation and avoiding a balcony etc. Neither of which would have happened using a basic connector portal.
    One thing to note about portals is that once portalling has started the unit will not respond to move orders until portalling has ended. It will record move orders but not act on them. You do of course fully control when portalling ends when you write your own action.

    I should mention that we are working on a few changes to height navigation and portals, the intended change to portals will allow portal actions to act as steering components, so that the actual movement part of the portal logic is handled automatically.