Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Polarith AI (Free/Pro) | Movement, Pathfinding, Steering

Discussion in 'Assets and Asset Store' started by Polarith, Apr 18, 2017.

  1. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @BCFEGAmes.

    This is a profound question that dives deep into the core of the steering topic. First of all, boids is a good example where a massive amount of agents must be computed. Therefore it is essential that the computation is not expensive and as fast as possible. That's exactly where classical steering is preferable since the overall movement of all individuals is more important than the local movement of a single individual. In a nutshell, it is just simple vector maths like dot products which is for instance described in the original publication.

    This is the reason classical steering was used throughout games, it is easy to implement at first and cheap. However, moving in a swarm is different than having a single agent that has to do smart MCO decisions. Errors don't get blurred by the mass but become visible to the player. This is why we used the Context Steering approach first described by Andrew Fray. After some research and development, we came up with a flexibel and robust system.

    So, of course, you can use our AI for boids. However, this is the one and only case where it I recommend to use classic steering. Since this is what steering by Craig Reynolds was made for.

    If you still want to try with Polarith AI, there are different approaches.

    First, you can write a script that computes the centre of all positions and use it as the target for AIMFollow. There you must distinguish two cases: you can either use a global approach for all agents or a local approach where you compute the centre inside a radius for each agent.
    Second, you could write your own behaviour that computes the centre position based on the objects it perceives like in Post 327
    or again global by a list of agents.
    But again, classical steering still would be preferable in this use case.

    Have a great weekend,
    Martin 'Zetti' Zettwitz from Polarith
     
  2. BCFEGAmes

    BCFEGAmes

    Joined:
    Oct 5, 2016
    Posts:
    14
    Hi Martin,
    Thanks for your reply, coincidentally, I was just reading the Fray chapter on GameAIpro, when I got the notification of a new post on the forum :) I will try, soon, to get going on writing a Polarith compatible behavior that uses follow on a local, radius based center, as in the post you mention. I'll post here when I get some results.
    I'm not after large flocks, more like 5 to 10 units aligning, avoiding, and "sticking together" ;)
    I wander if using the number of neighbors, to prioritize a leader to align more strongly with, would provide sufficient hint of a cluster center, based on the agent with more companions...
    Having just glanced at Adjust, which can handle clusters, a sense of cohesion is probably already achievable without needing to compute an abstract center for the flock, nice to have some time to experiment!
    Have a good day...
    Sergio
     
  3. bingofly

    bingofly

    Joined:
    Sep 15, 2018
    Posts:
    24
    @Polarith Hi There.

    After reading the documents and watching the videos, I still feel very confused. So I have to ask some questions before I pay for the asset pro. Maybe the questions are very simple and sorry for my stupid.

    My game has a procedural world incluing millions of tiles. Some tiles are "island" and others are "sea". NPCs on the island can't walk through the "sea-tile" as well as trees and rocks.

    The npcs are using Astar pathfinding plugin (by Aron) to get paths. The pathfinding works well, but the built-in rvo function of the plugin makes me crazy (sometimes the npc jitter and rotate like a fool). So I wanna find a library, which can work with Astar pathfinding and handle local avoidance.

    There are two questions:
    1. Dose Polarith AI Pro work good with Astar pathfinding?
    e.g After Astar pathfinding output a path, Polarith AI Pro should follow the path, handle local avoidance issues, especilly do not go into the "sea-tile" when handling the points of path becaus there maybe some offset due to avoidance.

    2. Dose Polarith AI Pro support dynamic world?
    e.g In my game, something like trees and rocks are not generated at beginning, they just be instantiated when a player go into the area they belong to, then be destroied when the player leave. So Polarith AI Pro should handle thousands of obstacles frame by frame. Is there any performance issue?

    Your reply will be much appreciated.
    Thank you.
     
    Last edited: Mar 19, 2019
  4. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @bingofly,

    I can understand your struggle and have to say your questions are far from stupid. :)

    Even though I could simply answer with yes and yes, the truth is more complex. First, our Pathfinding currently boils down to a linear path, the agent follows. So, every pathfinding algorithm that outputs such path is compatible, you just need to implement a wrapper. So, not a Problem needs some effort though.

    Regarding the procedural scene, it is challenging. Even though, Polarith AI perfectly handles dynamic environments. You can easily implement a script that updates the gameobject List of our AIMEnvironments. We recommend allocating an appropriate amount of maximum perceived objects per environment, such that constant memory allocations due to AIMEnvironemt are avoided.

    The good news is that you can easily test such an approach with our Free asset and measure performance by yourself. Using the AIMSteeringPerceiver and the AIMSteeringFilter, agents should only process the objects they actually see. If you also make use of the static flag you can even further improve. The pro version would add Load Balancing or Multi-Threading. Based on what you said I would say it is possible though. However, it is always better to see for yourself before spending money :)

    I hope these answers are convenient.
     
    Inspeinre likes this.
  5. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    418
    Just wanting to say, I'm loving your 3D patch updates on Twitter. :D

     
    Inspeinre likes this.
  6. Mohamed-Anis

    Mohamed-Anis

    Joined:
    Jun 14, 2013
    Posts:
    81
    Me too! Hope the free package will also be updated as I'd like to test it before making a purchase :)
     
  7. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @Mohamed-Anis.
    As we announced earlier, the 3D feature will be exclusive to the pro version. The free version will get an update, too, where we improve the visualization of the sensor by giving an opportunity to the old gizmos.

    Best wishes,
    Martin 'Zetti' Zettwitz from Polarith
     
    puzzlekings likes this.
  8. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    78
    Really great news will purchase the PRO version after it.

    Also if possible kindly include the Polarith PRO integration with Aron's AStar Path-finding package as for non-programmers it's really difficult to integrate them without any documentation or tutorial.
     
  9. jmacgill

    jmacgill

    Joined:
    Jun 17, 2014
    Posts:
    11
    Need any beta testers with a high pain tolerance?
     
  10. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    387
  11. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi guys!

    @dev_2051
    The integration of the AStar project is already on our bucket list.

    @jmacgill
    Thanks for offering us your help! Currently, we do not have plans for open beta testing. Additionally, we have finished testing the new features and are about to integrate them.

    I wish you an awesome start into the new week,
    Martin 'Zetti' Zettwitz from Polarith
     
    BCFEGAmes likes this.
  12. DaivyIsHere

    DaivyIsHere

    Joined:
    Dec 16, 2018
    Posts:
    1
    @Polarith Hi there.

    Is there anyway I can use AI Seek to avoid Tiles I made with unity tilemap system?
    AI seek takes GameObjects to operate, but I can't get every single tile in my tile map.
    I found that I can use GetTile function to get all the coordinates of my tiles in tilemap, so is it possible to assign those coordinates to the script and make it work?

    Also I can use 2d-extra tile map asset to add gameobject to the every tile I painted, but I hope I can find a lighter way to achieve what I want.
     
  13. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @DaivyIsHere,

    Unfortunately, it is not possible to directly assign vectors, positions respectively, to our system out of the box. There are several ways to achieve better performance.
    The elegant way is to write a custom behaviour that can handle vectors instead of GameObjects since we internally use the positions of the GameObjects (at least for simple behaviours).
    Another way is to gather neighbouring tiles in a single GameObject. This way, you can use a bounding box and AIMPlanarSeekBounds or use an AIMSteeringTag to set a circular offset/radius to a GameObject placed in the centre.

    Happy to help and thank god it's Friday,
    Martin 'Zetti' Zettwitz from Polarith
     
  14. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi guys!

    The launch of our upcoming 3D patch is just around the corner, and as you know, we've already provided a fair share of information. However, we want to give you the chance to ask us everything you want to know about the package on all our platforms! Pick the one you prefer or leave your questions in this thread!

    Twitter | Instagram



    We will answer all of your questions in a separate video next week!

    As always, thank you for your continuous support,

    Your Polarith Team
     
  15. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    860
    Oh well, this is a nice surprise, as I was currently looking for a simple and reasonably fast with no training (except for a path) to handle AI for a "3D micromachines prototype" I've been tinkering on these days.
    So I was looking for something to make it work out of the box, without touching ML or reinventing the... wheel :p




    My ideal requirements are:

    1) Each vehicle has 4 simple inputs (0f to 1f), it's actually the vertical axis + horizontal axis (and eventually the jump button, but I believe I can extend it)
    2) AI should be competitive while keeping the highest speed/shorter lap time (or similar, I need a reasonably stupid AI to be fun to play against, dumbing down some parameters to differentiate) and derail a bit to get a bonus on the fly, avoid a moving obstacle, or get back to the nearest point it got bumped off the main path
    3) The path may overlap, criss/cross, be on different heights (see picture)
    4) I should be able to link this to an AI output provider without rewriting it from the ground up :p

    Questions are (very specific for racing AI):

    a) Will I be able to do this with the new version?
    b) Which is the estimated price range?
    c) Is it, technically, a new asset on the asset store, or a separate one, with an Upgrade option, or ex pro users will be able to get it a no extra cost?
    d) Racing and high speeds are my main concern: does the system humanly attempts to estimate properly if an impact with a moving object (an adversary, or a 1ton hammer crossing the road all of a sudden) and avoid/get it? (crossing a moving bridge)
    e) I don't remember if the system supported braking to avoid getting too far away from the path. Does the new system handle that or is it more focused on local avoidance/steering (the output can only be an angle)? I read a few of your blog posts about the matter.
    f) Can the pathfinding find the nearest path position with complex intersecting paths (even on different heights) following a specific racing direction? (maybe using as a reference the last pathnode it reached before getting smashed out of the track?
    g) Can defined weights be assigned to points in the map or a zone (sphere/box), to prefer to not to avoid it completely but prefer to keep a certain distance? (like, avoiding a bump/slope/ramp/puddle on the road, a minor hazard)
    h) How are you going to handle irregular track borders? defining a width on the node, or by using other polygons? Is the world getting voxelized?
    i) Is it still going to be mobile friendly?
    j) Do you have any ETA on the release date?
    k) Is it going to use multithreading and the new Job System (Burst compiler)?

    Of course I'm aware that if the asset was going to handle all these specific requests it's going to be competitive even against the Unreal Engine pathfinding and AI, but I felt like asking just the same :p

    Thanks for your time!
     
    Last edited: Apr 7, 2019
  16. RadioactiveXP

    RadioactiveXP

    Joined:
    Nov 6, 2013
    Posts:
    69
    I use MapMagic for procedurally generated terrain. Does your asset work well in the case where the terrain is generated at runtime? I
     
  17. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @NeatWolf ,

    Some of your questions made it into the Q&A video. Nevertheless, here are the complete answers to all your questions. :)

    First, let's talk about your requirements though.
    The currently available behaviours are general purpose, so it is possible to design racing agents. However, there are better behaviours using line sensors which would be perfect for specific racing behaviours. I have to admit, that we have not implemented them yet.
    It is important to understand though, that our behaviours merely sample the environment to construct a so-called Multi-Criteria-Optimization(MCO) problem. AIMContext solves this problem in every agent update to present the best possible movement direction. You can apply this direction using any controller implementation you want. We ship some example controllers, even a vehicle controller. However, you need to adapt it to your specific needs. Since our output is a magnitude and a direction you have all the freedom you need.

    Regarding the AI settings, there are quite a lot of possibilities to adapt Polarith AI. There are parameters that can be adjusted dynamically, for example, to determine how "aggressive" an agent might behave (epsilon constraint of danger objective, or magnitude multipliers of avoid behaviours). Furthermore, you can define AI states for specific situations and change them dynamically, as presented in this video.
    Our current pathfinding implementation uses the results of UnityPathfinding. It is possible however to extend this feature with other pathfinding solutions. Basically, you need to implement a wrapper that takes a path and converts it in an AIMLinearPath our Behaviours need.

    Now to the questions regarding the next update.
    a.) The new version is about 3D sensors. There will be no benefit for your scenario. Most of your requirements can be evaluated even with Polarith AI Free.
    b.) The price stays constant for now :)
    c.) We are just updating the existing asset
    d.) We provide some behaviours that predict the movement of their targets. Also, all behaviours can predict their position based on the actual velocity or based on a custom scalar value.
    e.) There are no changes in the new version on these matters. Braking can be achieved in two ways, first by scaling the velocity (or acceleration) via the decidedvalues. Or by custom influences. After all, it is the controller's decision on how to translate the AI output into movement. Please check out this video for further reference.
    f.) As said above, our Pathfindingbehaviours gets the path that Unity calculates, so we are restricted to what unity provides. You can extend this though.
    g.) Yes, it is possible to attach an AIMSteeringTag to an Object and apply a "significance" value or a custom radius to alter the impact of individual objects.
    h.) There is currently no explicit mechanic to analyse borders of a racing track. You could either use the UnityNavmesh to repel the agent from the borders or use the PlanarBoundsBehaviours.
    i.) As said in the video, there are no significant changes regarding mobile
    j.) Currently not. The truth is that most of our staff is unfortunately occupied with external projects. The good news about that is that these projects guarantee that we can further work on Polarith AI. For now and in the future, since this project is really important to us.
    k.) Unfortunately not yet, we like the idea of the Burst compiler. Really looking forward to using a real Entity Component system. However, we need to focus on the 3D sensors right now.

    I hope that I could answer everything you need. If you have further questions, please feel free to ask. :)

    Franz Pieper from Polarith
     
    NeatWolf likes this.
  18. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @RadioactiveXP

    I have not used this specific asset, so I'm not 100% sure from looking at it how MapMagic works.
    The good thing is, you can verify the compatibility with Polarith AI Free, so you do not have to spend money on something that does not work for you. :)

    From what I saw, I'm not sure if Polarith AI works well with the terrain output. There are two things to consider here.
    First, we need gameobjects to process for our agents. If you can iterate through the objects generated on the actual map, everything is fine. You would need some extra effort to organize the objects and pass them to Polarith. This is, however, possible at runtime and fully dynamic.
    Second, the terrain itself might become problematic since the only behaviour we currently provide to process terrain is based on Unitys Navmesh. If this does not work with the MapMagic output, you won't have a behaviour for finding terrain borders out of the box.

    Please let me know if my assumptions were right, or if you experimented with the free version. I think this information could help other users too :)

    Franz Pieper from Polarith
     
  19. BodgeDev

    BodgeDev

    Joined:
    Mar 28, 2018
    Posts:
    7
    Hi,
    I'm trying out the pathfinding at the moment to get my agents to stay within the bounds of the map, however my project is in 2d rather than 3d, which makes things difficult for navmesh. Thankfully theres an asset called Navigating2D which uses Navmesh but in a 2d context, however rather than using NavmeshAgent, I need to use NavMeshAgent2D.
    How would I go about editing the AIM navmesh behaviours so they use this? Most of your behaviours are on github, but of course this being a paid asset you couldn't put it up for free, so I'm wondering where I could get the source code from that.
    Thanks

    Edit: I should mention I have tried bounds but I can never get it to work reliably
     
  20. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @BodgeDev,
    I am not familiar with this asset, so I can only guess what you'll have to do. Under the assumption, that your scene lies in the xy-plane instead of xz, you need to adapt our behaviour to this plane. What we are basically doing, is to set up a feeler (like a sensor) and do Navmesh.Raycast() in PrepareEvaluation() to determine hits with the NavMesh. The hits are passed to the hitlist in the backend class for further processing.
    To work in the xy-plane, you would need to set up your own feeler (list of vectors) and perform the corresponding raycasts on the Navmesh in the xy-plane (if raycasts are supported by your asset).

    Here are code snippets that might help:
    Code (CSharp):
    1.  
    2. public class MyFeeler
    3. {
    4.   public List<Vector3> directions = new List<Vector3>()
    5.  
    6.   public MyFeeler(int feelerCount)
    7.   {
    8.     directions.Clear();
    9.     for(int i = 0; i < feelerCount; i++)
    10.     {
    11.       // compute the i-th angle on a unit circle and map to vector
    12.       directions.Add(new Vector3(x,y,0))
    13.     }
    14.   }
    15. }
    Code (CSharp):
    1. using Polarith.AI.Move;
    2.  
    3. public class MySeekComponent : AIMRadiusSteeringBehaviour
    4. {
    5.    public SeekNavMesh SeekNavMesh = new SeekNavMesh();    // backend class
    6.    public int feelerCount = 4;
    7.    public feeler = new MyFeeler(feelerCount);
    8.    public int AreaMask = 1;   // bitmask for navmesh
    9.  
    10.    // hidden GO for internal processing (every behaviour needs a target for processing)
    11.    private GameObject navMeshTarget;
    12.  
    13.    public override RadiusSteeringBehaviour RadiusSteeringBehaviour
    14.    {
    15.       get { return SeekNavMesh; }
    16.    }
    17.  
    18.    public override bool ThreadSafe
    19.    {
    20.       get { return true; }
    21.    }
    22.  
    23.    public override void PrepareEvaluation()
    24.    {
    25.       // some preparation
    26.       if (FilteredEnvironments.Count != 0)
    27.         FilteredEnvironments.Clear();
    28.  
    29.       if (GameObjects.Count == 1)
    30.       {
    31.          GameObjects[0] = seekNavMeshTarget;
    32.       }
    33.       else
    34.       {
    35.          GameObjects.Clear();
    36.          GameObjects.Add(seekNavMeshTarget);
    37.       }
    38.  
    39.       // call the general stuff
    40.       base.PrepareEvaluation();
    41.  
    42.       // ======================vvvvvvvvv============================
    43.       // go through each feeler and perform a raycast from the current position
    44.       // to the target position (current + rotation * direction[i] * outerRadius)
    45.       for (int i = 0; i < feeler.Count; i++)
    46.       {
    47.           NavMeshHit hit = SeekNavMesh.NavMeshHits[i];
    48.           NavMesh.Raycast(originPosition, targetPosition, out hit, AreaMask);
    49.           SeekNavMesh.NavMeshHits[i] = hit;
    50.       }
    51.  
    52.       // set the resulting magnitude to navmesh bitmask
    53.       SeekNavMesh.ResultMagnitude = NavMesh.GetAreaCost(AreaMask);
    54.    }
    55.  
    56.    // init the hidden target GameObject
    57.    protected override void Awake()
    58.    {
    59.       base.Awake();
    60.  
    61.       if (seekNavMeshTarget == null)
    62.       {
    63.           seekNavMeshTarget = new GameObject("MySeekNavMeshTarget");
    64.           seekNavMeshTarget.hideFlags = HideFlags.HideInHierarchy;
    65.       }
    66.    }
    67. }
    To get full access to the source code, we provide an extra license model. If you are interested in obtaining the source code version feel free to contact us directly.

    Have a great Tuesday,
    Martin 'Zetti' Zettwitz
     
    BodgeDev and juanitogan like this.
  21. juanitogan

    juanitogan

    Joined:
    Aug 18, 2017
    Posts:
    25
    In case anyone is curious and looking to see Polarith in high-velocity use, I just added Polarith to my early-access game, GRITS Racing, and just published the update. Polarith may seem like overkill for such a simple-looking top-down 2D party game but, once you play it, you'll hopefully understand that what is under the hood is far from simple. Thus, Polarith is proving to be a good fit for the AI cars in this scenario (which usually try to avoid collisions, but not always).

    The demo is a free download from either itch.io or Steam. The full early-access version is only available for purchase on Steam at the moment (waiting for itch to fix their interface for games with demos, if they ever do).

    capsule_467x181_english.png

    The AI is still a work in progress so it will take some time to tune Polarith to what I want. Currently, I seem to be struggling most with the AIM Stabilization component. It's been hard to grasp how exactly Max Increase and Max Angle affect the decision making and whether to set these things high or low or disable stabilization altogether. Currently, it feels that Max Increase should be tiny and Max Angle has no effect. In particular, the cars seem to be having trouble adapting rapidly enough to the new target in a custom follow waypoints situation. Thus, the cars do well at 2/3 speed but not well at full speed. Increasing the Outer Radius on the other behaviors doesn't seem to help so it seems to be a matter of Stabilization tuning. I don't know if a change in FollowPath target gets stabilized along with everything else, but if it is, it shouldn't be.

    Regardless, Polarith is proving to be a great investment so far -- and a great addition to GRITS Racing -- and I expect I'll eventually get there with the tuning of it.
     
    Polarith likes this.
  22. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @juanitogan,

    We purchased your game. It is pretty awesome to see Polarith in action, especially with such high velocity where you go to the limits of physics at least in the sense of our AI. We didn't use a gamepad, and thus the AI performs much better than us. Compared to the AI, we are pretty nooby but had a lot of fun:D
    Thanks for your feedback, it means much to us :)
    Indeed, AIMStabiliztation does affect FollowPath, since it's using follow with dynamically changing targets under the hood. You can try to use different orders in AIMStabilization and FollowPath, so that AIMStabilization is applied before FollowPath. In general, magnitude multiplier, radii, radius mapping and probably value writing are good starting points for finetuning. Maybe, you can use an additional, custom version of FollowWaypoints that looks at the next but one waypoint and uses addition as value writing to have a tiny look into the future (just a wild guess). We know the struggle of finetuning the AI for a unique situation. :D

    Have a great Day,
    Martin 'Zetti' Zettwitz from Polarith
     
    juanitogan likes this.
  23. juanitogan

    juanitogan

    Joined:
    Aug 18, 2017
    Posts:
    25
    @Polarith - Oh, of course! I had forgotten about Order and the things I had read about it. Some things I just don't absorb until I have an application for it. I can now see how it can totally change what I was talking about with FollowPath.

    And thanks for checking my game out. That's really cool and an awesome return on my other bug report.
     
  24. juanitogan

    juanitogan

    Joined:
    Aug 18, 2017
    Posts:
    25
    @Polarith - After some more testing, I realized I had remembered the situation wrong. I'm good with the new target being stabilized with everything else, it's the old target in a path that doesn't seem to disappear from stabilization quickly enough. I haven't proven that it doesn't drop out of stabilization instantly but it feels like it doesn't and I've seen strange decided directions and interest sensors on freeze frames that seem to indicate the old target is still buffered. Once a waypoint has been hit, should it still be relevant at all?
     
  25. Ali_Akbar_Montazeri

    Ali_Akbar_Montazeri

    Joined:
    Dec 6, 2014
    Posts:
    184
    Hello, I just want to ask something. Can I make AI for fighting games like street fighter with this?

    Thank you.
     
  26. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @juanitogan.
    Sounds like the game physics updates faster than our AI does. You can adjust the UpdateFrequency in AIMContext. This is, in general, a good option for high velocity or time critical scenarios.:)

    Have a great day
    Martin 'Zetti' Zettwitz from Polarith
     
  27. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @Ali_Akbar_Montazeri,

    It is possible, though we never used the AI for a fighting game, yet. In case of a fighting game, the way one fills the context map should be interesting (like an offset to an attack (Hadouken) or active avoidance to jump or dodge). Note, that our AI will yield movement directions, but not actions. So I think you will heavily use state machines and a suitable controller (that you need to code yourself).
    You may check the free version of our AI to see the directions that our AI system computes. I strongly recommend the tutorials on YouTube and the documentation before you start.

    Have a great start into the week.
    Martin 'Zetti' Zettwitz from Polarith
     
  28. hsjaaa

    hsjaaa

    Joined:
    Apr 30, 2016
    Posts:
    29
    Hello there @Polarith
    You AI looks cool, wonder can it help with my problem? I am trying to make a RTS like game and having some trouble with unity build-in navmesh system, the agent steering around like forever while compete destination, sometimes push other agent while moving which is unwanted, it's better if I can decide when to push.
    Thanks.
     
  29. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @hsjaaa,

    Your game sounds like a common scenario for our AI. If you want to use it to avoid the boundary on the NavMesh, you need the Pro version.
    However, you can validate your requirements with the free version before spending money. Keep in mind though, that Polarith AI is a more complex system which also requires some time to learn.

    Polarith AI currently lacks explicit formation behaviours though. This is something we are going to publish after our 3D update. However, such behaviours would make it far easier to use for RTS games. It is possible though (even with the free version) to implement simple formation behaviours on your own. If you really want to invest the time.

    Have an awesome weekend,
    Martin 'Zetti' Zettwitz from Polarith
     
  30. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    polarith-doc-forum.jpg

    Greetings, fellowship!

    Over time, we received many questions regarding our behaviours and the API. Even if we know our documentation is outstanding compared to other libs, there is still space for improvement. Taking a step back and having another look after a while, we came to the conclusion that it's hard for us to spot the lacks in our documentation.

    We as developers are too deep into the source code to recognize if something is unclear. That's where you come into play! We need your feedback so we can help you :)

    If you have any questions or improvements for the documentation, you are welcome to post it in our brand new GitHub issue!

    Have a legendary weekend you legends,
    Your team from Polarith
     
    Last edited: May 7, 2019
    Mohamed-Anis likes this.
  31. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    387
    Hey,

    Any update / ETA on the incoming 3d patch?

    cheers

    Nalin
     
  32. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @puzzlekings,

    One of our developers from this project went ill, so we got a little delay. Now, we are doing the final merges and are close to the release.

    Have a great day,
    Martin 'Zetti' Zettwitz from Polarith
     
    BCFEGAmes likes this.
  33. jmacgill

    jmacgill

    Joined:
    Jun 17, 2014
    Posts:
    11
    I've just started playing with 'Prediction' on the Follow behavior. I can get the fixed 'Prediction Magnitude' to work but I'm not sure how to correctly setup 'Velocity Magnitude'. Does the behavior have to be on the same component as a rigid body?
     
  34. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @jmacgill,

    You don't need to assign the RigidBody directly to the AI's GameObject, but to the Object containing the RigidBody on AIMContext.SelfObject. Thanks to you, we found a bug: the velocity Gizmo is missing in AIMFollow.

    Have a great Friday,
    Martin 'Zetti' Zettwitz from Polarith
     
  35. jmacgill

    jmacgill

    Joined:
    Jun 17, 2014
    Posts:
    11
  36. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @jmacgill,

    The bug appears in the Editor, not in the code we published on Github. We will fix it with the next update coming soon. Until now, you can simply add AIMSeek, configure the prediction equivalently and activate the Velocity Gizmo. It will do the same job.

    Have fresh start into the new week,
    Martin 'Zetti' Zettwitz from Polarith
     
  37. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    160
    I just purchased this asset and am excited to get using it, however, on import, I get a series of errors related to The type or namespace name 'NetworkBehaviour' could not be found. Any ideas on how I can fix these? Perhaps just deleting that example scripts folder related to networking?
     
  38. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @alanmthomas ,

    thanks for purchasing our product. :)

    You got it exactly right. Unfortunately, the network scripts became deprecated. These are mere examples and can be deleted from the package without any problems regarding the actual AI product.

    It's a pity, that we were lacking the time to replace them yet. We simply wanted to provide a showcase on how to use our AI in Multiplayer Games.

    So just delete these network scripts and scenes, then you can enjoy the other showcases such that it helps you getting productive with our asset.

    Best regards,
    Franz Pieper from Polarith
     
  39. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    160
    That's what I did and everything seems to be working fine now. Thanks!

    I do have a scenario that I was hoping to get some help with. I have a set up right now where I am using a nav mesh and agents that I am attempting to switch over to your asset. I have a pack of agents that move around a circuited track. The pack moves around the track as a group from one waypoint to the next. The issue with the nav agents is that their avoidance of each other is pretty terrible and there will often be a nudging behavior where one agent forcibly moves another to get to its objective. I'm using this set up as I do need to keep the characters constrained to the track and, in theory and mostly in practice, the nav mesh system is great for this. Also, I need to be able to start and stop the collective simultaneously.

    How would you recommend going through the conversion on this? Any advice is appreciated.
     
  40. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @alanmthomas,

    Basically, you need three things. First, you need a target for the agents. You should use AIMFollowWaypoints and pass the waypoints of your circuited track to it. Second, you need to add avoidance to the racing track. Our NavMesh behaviours are made for this. I would recommend using AIMSeekNavMesh to add some danger to the border of the track. This way, the agents will avoid moving close to the edge. If this is not enough, you can try to add AIMFleeNavMesh to add interest away from the edge (perpendicular to the agent).
    Third, you need to add avoidance to the other agents. Therefore you can use AIMAvoid(interest parallel to the object) for active avoidance, AIMFlee (may be too harsh) and AIMSeek(danger) for passive avoidance. Additionally, AIMReduction and AIMPursue(danger) may be nice options for you. Feel free to experiment with the behaviours.

    Have a great weekend and a lot of fun while exploring the AI,
    Martin 'Zetti' Zettwitz from Polarith
     
  41. MrJBRPG

    MrJBRPG

    Joined:
    Nov 22, 2015
    Posts:
    29
    I remember purchasing Polarith AI, which is currently pro, back when it first launched.

    I have some questions in regards to the Polarith AI capabilities:

    Is it possible to do Navmesh in 2D (X & Y) with Polarith Pro?
    Is it possible to integrate "state machine" logic to override Polarith AI movement, example is using "AI joystick" to automatically accelerate?

    I was toying around with a prototype with very basic AI without using Polarith and I want it to avoid solids and go around to seek the player.
     
  42. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    78
    Hi Martin,

    Can you give an approx. ETA for the next update?

    Thanks.
     
  43. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @MrJBRPG,

    Yes, you can. We offer NavMesh Support by AIMSeekNavMesh, so the agent will recognize the border of the NavMesh.
    Yes, you can simply deactivate the agent's AIMContext component. Additionally, you can use a state machine to activate, disable a specific behaviour, or change the behaviours parameter.

    For solids, you should use AIMPlanarSeekBounds or AIMPlanarAvoidBounds. (In case the basic behaviours without bounds do not satisfy enough).

    Good vibes,
    Martin 'Zetti' Zettwitz from Polarith
     
  44. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @dev_2051,

    Unfortunately, many of our developers are ill :( The heatwave in Europe paired with summer flu is a nasty combination, especially when we need developers for our vital industrial projects. We are looking forward, to merge the code and the package examples as soon as possible, but I can't make a promise for a certain release date. Our whole team feels really sorry for you guys.

    Martin 'Zetti' Zettwitz and the team of Polarith.
     
    Vincent13122 likes this.
  45. PartyBoat

    PartyBoat

    Joined:
    Oct 21, 2012
    Posts:
    82
    Hey @Polarith are you guys planing on porting this system to DOTS?
     
  46. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @PartyBoat,

    Currently, we don't plan to upgrade the system since we would need to overwrite the core, and we don't have the capacity for this besides other projects. Multithreading is already available, but of course, JIT would be a great benefit.

    Have a great day and stay hydrated,
    Martin 'Zetti' Zettwitz from Polarith
     
  47. FirstAndTen

    FirstAndTen

    Joined:
    Oct 16, 2017
    Posts:
    16
    Can you please point me to a good starting point code for writing a 2D controller that doesn't use dynamic rigidbodies? My agents are kinematic so I need to use MovePosition to update them. I looked at the two controllers in the examples but they both seem to be 3D focused. I'm looking for code more akin to the simple controller 2D to get started.

    I love the library so far, just hard to write your own controller without something to get started with.
     
  48. HanAusBerlin

    HanAusBerlin

    Joined:
    Sep 13, 2017
    Posts:
    61
    Hi,
    I am trying to build a city scene. Avoiding small obstacles/following interest works fine. But as soon as I add larger objects (more than 1m on one axis) the object gets ignored. I tried to play around with the radius on seek and flee elements but without much sucess. I want the agents to avoid really large obstacles like buildings without using navmesh.
     
  49. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @FirstAndTen,

    We have to apologize for taking so long. Somehow the message got lost in our system.

    Nice to hear that you love our product and that you want to dive deeper into it. Currently, only the AIMSimpleController ist able to move in a full 3D environment. All other controllers are only able to move on a 2D plane. The controllers named 2D are used for the XY-plane while the AIMPhysics controller is used for a 2.5D environment, i.e. moving on the XZ-plane in a 3D space.

    The AIMSimpleController2D is similar to your case. First, you need to attach a RigidBody2D. In general, you need to compute the rotation and movement direction, both as delta values to you current rigidbody's transform. If you want to correlate the movement speed with the interest value of the
    Context.DecidedDirection
    , just scale it as we do:

    Code (CSharp):
    1. velocity = Context.DecidedValues[ObjectiveAsSpeed] * Speed;
    2.                 velocity = velocity > Speed ? Speed : velocity;
    Note that
    ObjectiveAsSpeed
    refers to the objective that you want to correlate with, i.e. 0 if interest is your first objective (default case).
    Now you can follow the documentation of RigidBody2D.MovePosition and RigidBody2D.MoveRotation to set the values appropriately.

    Happy coding,
    Martin 'Zetti' Zettwitz from Polarith
     
  50. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    196
    Hi @HanAusBerlin,

    For larger objects, you can attach an AIMSteeringTag to your buildings and adjust its radius. For a more accurate perception, you can use the bounds behaviours of the pro version like AIMSeekBounds or AIMPlanarAvoidBounds.

    Greetings from Magdeburg,
    Martin 'Zetti' Zettwitz from Polarith