Search Unity

Poly|Nav: Pathfinding for Unity2D

Discussion in 'Assets and Asset Store' started by nuverian, Jan 27, 2014.

  1. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    So. Within InflatePolygon, if you remove .normalized from this code:
    Vector2 mid = (ab + ac).normalized;

    ...it will work much better for a temporary solution. Not perfect. Still looking for the solution.
    Cheers!
     
  2. Sh4D

    Sh4D

    Joined:
    Dec 8, 2014
    Posts:
    17
    Thanks a lot, this is exactly what I was needing :)
     
  3. RichCWilliamson

    RichCWilliamson

    Joined:
    Jan 13, 2014
    Posts:
    5
    **EDIT** Well, nevermind...I thought I was using a List before, but apparently I need to use an array for the path points...

    1. void OnPathReady(Vector2[] path, bool pathFound){
    2. //do something...
    3. }

    Hi there - I'm using Unity 5 and getting this error on my code (is that my first problem?) I upgraded my project to 5 and was hoping to keep using your tool that I have experience with in 4.6

    Assets/PathValidation.cs(50,43): error CS0123: A method or delegate `GameNamespace.PathValidation.OnPathResult(System.Collections.Generic.List<UnityEngine.Vector2>)' parameters do not match delegate `System.Action<UnityEngine.Vector2[],bool>(UnityEngine.Vector2[], bool)' parameters

    Here's my code:

    polyNavMainObject.FindPath(_specialRoute.citySource.transform.position,
    _specialRoute.cityDestination.transform.position, OnPathResult);

    voidOnPathResult(List<Vector2> _path) {

    isPathClear = true;
    path = _path;

    }
     
    Last edited: Aug 10, 2015
  4. erre-rox

    erre-rox

    Joined:
    Dec 3, 2012
    Posts:
    23
    Hi,

    I' m working on a project using PolyNav2D. It' s cool, but I'm having an issue with Agent Collider. I saw that in your demo scene agents haven't a collider. If I add it, after I can't understand where specify that agents has a "dimension" (it' s not just a point as before). The result is that the agents are bouncing off the obstacles, ignoring their own collider.

    Is there a workaround for this problem?

    Thanks.
    Andrea.
     
  5. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello and thanks :)

    PolyNav works independantely of colliders or physics for agents.
    If you want agents to avoid each other, please use the "Avoid Radius", but,
    unfortunately at this point, having a radius with which the agent will keep distance from walls for example is not implemented/supported. Sorry.
    I might take a look at this feature after summer vacations though.

    Thanks
     
  6. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
    Hi Nuverian, if I wanted to move my @polynav2D for an endless runner, how would I do so? I tried moving the @PolyNav2D and I am not exactly sure what Regenerate on Change does but is this possible to do?

    Edit: Just found something that is very important. When I use MoveToPosition in playmaker it is setting to Z to 0, and this is breaking my entire project. I really need the zero to not be affected when the characters are moving. Can you please help me out with this?
     
    Last edited: Aug 13, 2015
  7. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    Sorry for the late reply.

    You can move the PolyNav object or any obstacles at runtime and the call PolyNav2D.current.GenerateMap(true) to regenerate it, but I realy do not recommend doing this very frequently because that is quite performance heavy to do.
    By the way, if the "Regenerate on Change" is checked, then when any obstacle is enabled/disabled or moved/rotated/scaled, the GenerateMap is called automaticaly.

    Regarding the Z issue, please open up PolyNavAgent.cs and replace the "position" property at line #64 with this code:
    Code (CSharp):
    1.     ///The position of the agent
    2.     public Vector2 position{
    3.         get {return _transform.position;}
    4.         set {_transform.position = new Vector3(value.x, value.y, _transform.position.z);}
    5.     }
    I will also leave it this way on the next version update. Thanks for the notice.

    Cheers!
     
  8. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
    Hi Nuverian, I had another question. About the move to game object in the playmaker action, right now the object moves to the last known position the object was when the action was called but is there a way to constantly update the position of the game object so that the move to gameObject keeps going until it reaches the moving gameObject?

    I must've set it up wrong because it works like this already.
     
    Last edited: Aug 25, 2015
  9. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    Was wondering if it is possible to set up waypoints with Poly Nav that are attached to a prefab. For example, I'm creating a tile based randomly generated map. I have spawn points on the map for enemies, and want the enemies to wander around to random nearby waypoints. However, the waypoints need to be attached to the prefab and not based on global position. Any idea how to do that?

    EDIT: We figured it out, but it seems there are huge performance hits if you have more than 20 characters and 20 waypoints. Could be something else, but I haven't been able to track it down.
     
    Last edited: Aug 24, 2015
  10. Sluggy

    Sluggy

    Joined:
    Nov 27, 2012
    Posts:
    984
    This subject has come up several times now and I believe nuverian is coming up with a solution for the next version of PolyNav. However, if you can't wait that long and you're not afraid to get a little dirty with the code I have a few modifications I can post that should considerably help the situation with the current version.

    As well, I would recommend that you consider how often your agents actually need to do full pathfinding. In my game, the player has a maximum rate every fifth of a second if they hold down the mouse since the cursor needs to display where they will end up with relatively smooth motion. But my AI units can get away with far less. Often only one or two path checks every few seconds or more if you use some raycasting trickery at close range.
     
    nuverian likes this.
  11. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    Hey,
    I already know this option, but it's not achieving what I want it to do for me.
    My agent should move to the closest point of the collider that is clicked.

    I added a picture to better explain which functionality I want.

    So if I click on an island with an polygoncollider for instance, then
    the agent should only move to the island via the fastest/clsoest path and then stop there when it's at the collider.
    If I click at the back of the island the agent should therefore not move behind it (closest point on invalid),
    but should move to the closest point of the island (at the front).
     

    Attached Files:

  12. Filcius

    Filcius

    Joined:
    Aug 26, 2015
    Posts:
    1
    Can anyone confirm if this works with Unity5, before I buy it?
     
  13. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    This is not possible the way you describe it. The usual behaviour in such situations is to find the closest valid edge of the invalid destination point requested and move there instead. Sorry.

    Hello,
    Yes it does work fine with Unity 5.
    Thanks.
     
    Filcius likes this.
  14. Sh4D

    Sh4D

    Joined:
    Dec 8, 2014
    Posts:
    17
    Hey,
    Yes it works fine with unity 5, and is easy to use edit.
    Nuverian I would also love to have the option John05 asks for : Getting the shortest path to obstacle on invalid rather than closest point which always sends me behind or around an obstacle. I wouldnt care for most of things but I badly need this for opening doors for instance. Like it is now the GetCloserEdgePoint function will always send my character to open the door from the same side. ( The door is obviously an obstacle when closed and the set destination is inside the door polygon.) I could go around this by trying to define if my character is inside a building or a room, and then setting a destination in front of the door but that looks a lot of trouble and might be innacurate. While just setting the shortest path on invalid seems a better solution overall.
    I dunno exactly how to achieve this, I think tracing direct path from the two last nodes and then take the first valid point from the end node could work? I will work on this now.
     
  15. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    I can take another look at this and see what I can come up with based on your suggestion.
    Thanks
     
  16. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    Hi,
    That would be great if you can take a look at it, thanks in advance!

    @Sh4D: Please let me know if you find a solution in the meantime.
     
  17. Sh4D

    Sh4D

    Joined:
    Dec 8, 2014
    Posts:
    17
    Hey,
    I was busy but I just spent some time looking at a possible solution. If you only need a ship to stop in front of an island it could be done easily using ur ship tranform position in the GetCloserEdgePoint function then testing if a possiblepoint position is in the segment of tranform.position, point.
    something like this : if ((point.x - tp.x) * (possiblePoints.y - tp.y) - (point.y - tp.y) * (possiblePoints.x - tp.x) == 0) in the loop.
    But for what I need and for what would be a proper way to do it I need the position of the node just before the last one, you only get that info when the path is defined, in the way how things are now. Would need to change the core of how the path is calculated (two nodes at a time, adding next one when removing reached one) or recalculate last node after the path is calculated on invalid or just let character go on anyway whatever is the destination and play with restriction? Ill be working more on it tomorow anyway.
     
    johanneskopf likes this.
  18. Sh4D

    Sh4D

    Joined:
    Dec 8, 2014
    Posts:
    17
    Ok so I got something working for me but I guess it won't fit for you. I suggest you take some time to understand how polynav works to get yourself a proper solution. For start you can draw all the nodes that are generated when the map is created.
    So what I did for myself, and I only need the fastest path solution for opening closing doors, barricading windows, is that I don't check if the point is valid when you click those objects. I use the endnode position even if it is invalid and link it with 2 nodes that are generated by the clicked object (front and back). I then set the agent On arrived when the activepath.count ==1. This could also work for yourself but the agent end position will be a node generated by the clicked polygon and not the most direct path.
    EDIT: I thought more about it and I think that you can get the result you need by using my method and then just checking a valid point on the segment from the activepathcount.3 to the endnode, then setdestination to that position!
     
    Last edited: Sep 6, 2015
    johanneskopf likes this.
  19. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    @Sh4D: Thanks for sharing your thoughts with me and helping me!
    I got it working:
    Set the destination to the nearest point of the PolygonCollider2D of the island (One simple calculation).
    Therefore I don't have to change the code of PolyNav2D and the solution is nearly perfect.
    If I would use PolyNav2D to calculate the nearest invalid path first, then it would take more time. Therefore my solution saves computing time too.
     
  20. zeiteisen9

    zeiteisen9

    Joined:
    Nov 8, 2013
    Posts:
    2
    Hi,

    I checked Closer Point On Invalid but it wont work on newly created agents after the path is invalid during runtime. See that video http://screencast.com/t/ROgHrPYNWkz
     
  21. Tivec

    Tivec

    Joined:
    Jun 20, 2015
    Posts:
    13
    Hello! I just bought PolyNav and I'm impressed at how simple it was to get it running. I did run into a little hitch and would like to ask if anyone has run into a similar problem.

    I have a complex collider set up from a Tiled import (Tiled2Unity). The collider looks like this: http://i.imgur.com/R61Re8E.png

    Now, I set up the Polynav to completely encompass the area (like this: http://i.imgur.com/PiKBG0E.png) but when I add the PolyNav obstacle to the imported collider, only a small segment of the collider is actually made into a nav obstacle (the red one up top): http://i.imgur.com/vhyWBUE.png

    I am depending on being able to import pre-made maps and colliders into my game from Tiled, so I do hope there is a way to solve this issue. Thanks in advance for the help, and thank you for an otherwise great product :)
     
  22. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    @Tivec: Every obstacle corresponds to a whole collider.
    And what I think is that PolyNav2D isn't able to handle complex polygoncolliders. (Therefore one polygoncollider should be one continous section)
    I would try to convert your PolygonCollider2D to many PolygonCollider2D's, each with a continous section and make an PolyNav obstacle with each of them. This should allow PolyNav2D to handle the collider properly.
     
  23. Tivec

    Tivec

    Joined:
    Jun 20, 2015
    Posts:
    13
    @john05: Thanks for the answer. Is it possible to extract "isolated" polygons from a collider somehow, or do I have to do the job manually? For now I've gotten around the issue by manually building up the collision polygons, but being able to export from Tiled would speed up production by quite a lot :)

    Edit:
    Just as I wrote that, I realized that of course there is a way. I'll fiddle with it and see what i can come up with.

    Posting this for the future, I made a very simple script that I attach to the imported collider gameobject. It goes through the polygon collider 2d and splits it into separate polygon colliders, and finally attaches a PolyNavObstacle to it. It does this on start though, so it won't be done in the editor.

    Here's the code, for anyone who might want it (also, my C# skills are meager at best, so any suggestions are welcome.

    Posted as a paste, since I couldn't paste the code here: http://pastebin.com/0Bdv97jB

    Hope that helps someone :)
     
    Last edited: Sep 14, 2015
    johanneskopf likes this.
  24. likwid

    likwid

    Joined:
    Apr 24, 2013
    Posts:
    16
    Hey nuverian,

    Any updates to adding an "area cost" feature to this? This would be extremely useful to RPG games.

    Thanks
     
  25. zeiteisen9

    zeiteisen9

    Joined:
    Nov 8, 2013
    Posts:
    2
    The performance for the regeneration of the map is really bad after adding more than 50 rectangle obstacles during runtime on an iPhone 5. How can this be improved?
     
  26. Tivec

    Tivec

    Joined:
    Jun 20, 2015
    Posts:
    13
    If I have created a path using PolyNav2D.current.FindPath(), how would I assign that path to an agent without using SetDestination and having to recalculate the path? I can set the activePath on the agent, but that only sets the first path segment (I think). Is there something I am missing here?
     
  27. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    This looks nice! I have a couple of questions...

    1. Do you know whether it integrates well with uScript?

    2. Are navmesh agents limited to moving using the movement scripts provided, or would it be possible to integrate my own movement patterns by looking at the next node? What I ideally want to do is use PolyNav2D to calculate the path, then use my own scripts to look at the next waypoint and move the agents there using my own behaviours (for example, little scuttling movement patterns etc. rather than the smooth, constant speed provided).
     
  28. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @Everyone. I'm very sorry for the late replies. Development has laged behind a bit on the last 2 months due to other projects, but I hope this to change in the comming months :)

    Hey. I don't see something going wrong in the video. Can you please clarify?
    Thanks

    Thanks for sharing this:)

    Hello. Sorry, no updates on this front yet. I didn't had the time to work on PolyNav in the last months due to other projects, but will do in the comming month. Thanks.

    Hello. Generating the map can be intensive yes. It's really not ment to do it for dynamic changes in the game, but rather more targeted towards procedural generation for the start of the level for example. I will try and improve this in version 2 though.
    Thanks.

    Hello. I just re-checked manualy setting the path through "activePath" property and it works as expected. Can you please double check that, or clarify on the issue please?
    Thanks.

    Hello and thanks :)

    1. Since uScript can call methods on monobehaviours through reflection, you should be able to call SetDestination on the PolyNavAgent script to set the agent a new Vector2 destination. I have't actualy done it, but it should work, yes.

    2. Yes. You can calculate a Vector2[] path and use the rest of the system without acually using the PolyNavAgent script at all if you want so.

    Cheers!
     
  29. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    Awesome, sounds great. Thank you!
     
  30. Darkkingdom

    Darkkingdom

    Joined:
    Sep 2, 2014
    Posts:
    81
    Hey nuverian,

    As written, thank you for this great tool!
    But I have problem with Unity 5.2.1
    Sometimes, for example when I'm editing an Agent, my PolyNav GO is destroyed and looks like this:



    So there are no buttons to edit the colliders and so I'm unable to change something in my levels :(
    I had to restore my game many times, from an older backup because, a simple reimport doesn't repair it in the inspector.
    But I get a bit tired from the restoreing and do the last changes again, so it would be reaalllly cool if you can help me with this :)

    Ah and btw. is it normal that every time I start the game, all my NavAgents say:

    "Failed to create agent because there is no valid NavMesh"

    Is there a possibility to stop this message or repair it?^^


    Thank you very very much in advance

    Darkkingdom :)
     
    Last edited: Oct 3, 2015
  31. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello and thanks as well.
    It looks like you have put the Unity inspector in "Debug" mode :)
    Please change it to "Normal" to get the inspector back, from the inspector menu at the top, right next to the Lock.
    2015-10-04_11h37_43.png

    Cheers!
     
    Darkkingdom likes this.
  32. Darkkingdom

    Darkkingdom

    Joined:
    Sep 2, 2014
    Posts:
    81
    Ohhhhh god x.x *atomicfacepalm*
    Damn you, debug mode!
    I was whole time in the debug mode, because of another error x.x
    And I wasted hours of my time with restoreing, and not doing that simple click xD

    Ok thank you very much^.^
    But the "Failed to create agent because there is no valid NavMesh" Warning still appears.
    Any soultions for that? :)
     
  33. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,

    Dont worry about it :)
    That error, is realted to Unity's NavMeshAgent. PolyNav doesn't really log that error since it doesn't work with Unity's NavMeshAgent. Are you using that component somewhere maybe?

    Thanks!
     
    Darkkingdom likes this.
  34. Darkkingdom

    Darkkingdom

    Joined:
    Sep 2, 2014
    Posts:
    81
    nuverian you're the best :)

    One last question and I'm happy^^
    Do you continue supporting your system with Unity 5?
    I'm a bit afraid that the life time of PolyNav ends in a few months.
    That would be really, really sad :(
    It's a fantastic tool, for the small topdown minority! :)
     
  35. nemish-i-nelos

    nemish-i-nelos

    Joined:
    Sep 1, 2013
    Posts:
    6
    Hello! I'm wondering how to implement functionality of dynamic changing of order in sorted layer like in the adventure game demo

    Assume I have game object animated with unity animation system, by moving body parts separately. Can I implement such functionality with poly nav? I mean moving in 2d adventure style with possibility to be in front of/behind of some sprites dependent of my position in polynavmesh. Thanks!
     
  36. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    Thanks :)

    Yes. The next version will be submited with Unity 5.2 on top of the regular 4.6 to increase compatibility.
    Don't worry. I will be around for a long time :)

    Cheers!

    Hey,
    I have PMed you the code that makes this possible ;)
    Thanks.
     
  37. nemish-i-nelos

    nemish-i-nelos

    Joined:
    Sep 1, 2013
    Posts:
    6
    Nuverian, thanks a lot for support.
    P.S. Your other tool "NodeCanvas" looks really awesome. I think, I must look at it closer in the near future :)
     
  38. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    You are welcome and thanks as well :)
    If you need any further help, let me know.
     
  39. Sh4D

    Sh4D

    Joined:
    Dec 8, 2014
    Posts:
    17
    Hey, Ive got a small problem. I think I have read elsewhere about it in this thread but can't find it right now.
    So sometimes, randomly, and never yet in a build version but only when i am testing my scene, I got some or all my agents stuck at vector.zero. Do you have any clue why this might happen? ( Yes I have quite a lot edited your scripts, but nothing about spawning agents at vector.zero, and making them unable to move from there... ) But I have no clue where this might come from, this might just be something I missed stupidly or does this just happen cause my project starts being really huge... If you have any clue, thank you!
     
    Last edited: Oct 12, 2015
  40. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    I think it might be related to the Awake method. Does Awake looks like this in your PolyNavAgent script? :
    Code (CSharp):
    1.     void Awake(){
    2.         primeGoal = transform.position;
    3.         _transform = transform;
    4.     }
    Let me know
    Cheers!
     
  41. Sh4D

    Sh4D

    Joined:
    Dec 8, 2014
    Posts:
    17
    Hey!
    No, my Awake only had _transform = transform;
    I added Primegoal = transform.position to test it but I still have randomly some agents spawning and being stuck at Vector.zero.
    Really weird, I have no clue why this happens but I see my depth rendering scripts are unfonctionnal when that happens also...
    Anyway it's really random and not that often. I suspect it might be some performance issues or something linked to my computer. If i find out why it was happening I will tell you. Thank you anyway!
     
    Last edited: Oct 15, 2015
  42. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    If you can PM me a project if at all possible, I can certainly take a look at it. I really can't think of any other reason for this happening other than the Awake above. :/
    Thanks!
     
  43. Lightrail

    Lightrail

    Joined:
    Apr 12, 2013
    Posts:
    37
    Hello,
    So I've been using PolyNav for a 2D platformer of sorts as Behavior Designer has it integrated with their system. As I use it, I'm starting to think it's not the best solution for this type of game. It works as intended and I can see the benefit of it for something like a top down game but I was wondering if anyone has found a way to make it work with 2D platformer mechanics (gravity and jumping for example). I think I could make it work if there were a way to lock it to the X-axis to prevent a grounded enemy from trying to pathfind to the sky (this causes the rigidbody 2d to "skip" along the surface). Any ideas?
     
  44. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,

    Sorry for the late reply. I've completely missed your post.
    PolyNav would not work for a platform game where gravity is of importance. Pathfinding for such games, requires a completely different approach than the one PolyNav (and most pathfinding assets i know of) use.
    I was working on a pathfinding solution for platform games, but it's far from finished right now :)

    Let me know if you require anything at all from me in this.
    Thanks!
     
  45. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Hi, i'm having a problem with collisions. I've set the avoid radius to 1 but somehow the agent doesn't care at all. Any idea ?

    Here's a quick gif:
    http://www.gfycat.com/HonestLegalBee
     
  46. Zsquare.co

    Zsquare.co

    Joined:
    Nov 2, 2015
    Posts:
    6
    I can not find the cause of the error
    As it would be fun hoping to get help
    Replies to ask
    ---------------------------------------------------------------------------------------------------------------------------------------------
    NullReferenceException: Object reference not set to an instance of an object
    PolyNav2D.PointIsValid (Vector2 point) (at Assets/PolyNav2D/Scripts/Runtime/PolyNav2D.cs:331)
    PolyNavAgent.SetDestination (Vector2 goal, System.Action`1 callback) (at Assets/PolyNav2D/Scripts/Runtime/PolyNavAgent.cs:173)
    PolyNavAgent.SetDestination (Vector2 goal) (at Assets/PolyNav2D/Scripts/Runtime/PolyNavAgent.cs:149)
     
  47. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Invalid e-mail address and no forum reply; very nice support ! I'm asking for a refund.
     
  48. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    The avoid radius parameter on the PolyNavAgent component is relevant to local avoidance beetween agents to avoid each other.
    If you want your agents to keep a distance from the obstacles, there is a parameter on the PolyNav2D inspector called "Radius" which by default is set to 0.1. If you increase it, you will also see the effects of it in the Gizmos. This is the option you are looking for if I am correct.

    You've just post your question in sunday and I've been away yesterday. I don't think 1 day is exactly late, but in anyway, if you want a refund I will provide one. My email adress is valid and it is nuverian_at_creative-minds.gr

    Hello,
    Are you using the latest version from the asset store?
    Thanks.
     
    tosiabunio likes this.
  49. Zsquare.co

    Zsquare.co

    Joined:
    Nov 2, 2015
    Posts:
    6
    Yes.
    I have held the latest version.
    Ensure that was updated in the asset store,
    It was not downloaded a few days.
    I would like to know if there is a way to determine the version of the current assets I have.
    If the latest version of the error, even though I would like to know if resolution.
    Using the wrong one can not rule out the possibility of errors caused by.
    Thanks.
     
  50. Milo_del_mal

    Milo_del_mal

    Joined:
    Jan 27, 2013
    Posts:
    43
    I am doing a game kind of like lemmings, but the other way around. Entities have to run away from the player, who is trying to kill them.

    I am wondering if this is the right solution for me. I have not been able to find any documentation; I have not found any demo (or video related for that matter) displaying sidescroller/platformer pathfinding.

    Do you think this is the right solution for me?
    My entities are controlled with rigidbodies because the pass through breakable bridges made of joints, and they are affected by multiple physic objects.

    This is a picture of a test scene.
    https://drive.google.com/file/d/0ByN7a5K93ruaaFN1UDF2dzJ1dkE/view?usp=sharing