How to use AIPath + RVO Controller?

Hello,

I am trying to get started with A* since the local avoidance is back. I am having trouble getting my local avoidance to work.

Basically, my scene is setup like so:

I have 2 capsules. Each have the RVO controller attached to them. One of the capsules has the AIPath script attached (we’ll call this capsule “player”). The other does not since it won’t be moving (we’ll call this the “enemy” capsule).

I set the target for the AIPath script of the “player” capsule to be behind the “enemy” capsule (so that it has to move around it).

What I expect:

I expect the “player” capsule to go forward, then when it makes contact with the “enemy” RVO Controller boundaries, I expect it to go around the “enemy” capsule.

What happens:

The “player” capsule just collides with the “enemy” capsule’s RVO boundaries and just stands there since the “enemy” capsule is in it’s path… How do I get it to go around it so that it can continue on it’s path?


Am I just misunderstanding how these scripts are supposed to be used? I followed the tutorial on the RVO controller in the docs, but it basically just has the capsules move forward against eachother, and when they meet they just divert to the opposite directions. How do I get them to go around eachother? Any help would be great!

anyone?

Hi, before start, i would like to say sorry for my english ok?

Try to add scripts in this order:
1.YourObject.AddComponent (“RVOController”);
2.YourObject.AddComponent (“Seeker”);
3.YourObject.AddComponent (“AIPath”);
4.YourObject.AddComponent (“SimpleSmoothModifier”);

If you add RVOController after AIPath, for example, your object(with RVOCOntroller) will pass throught another object (with RVOCOntroller).
It seems to me that AIPath must identify RVOController already added in your object to work correctly.
I don’t know but it may help you.

I do think I added my scripts in that order but I will do it again just in case and see what happens. I’ll have to do it after work when I get home though. Thanks!

Hey so I didn’t have any luck with setting up those scripts in the order. I ended up making a short video of how I am setting it up, hopefully you or someone can better understand my problem.

link to the youtube video: https://www.youtube.com/watch?v=LxoyZMuonYU&feature=youtu.be

as you can see in the video, once each capsule’s RVO controller boundaries meet, the capsule basically gets stuck. How would I go about making it go around it?

Hi again,
When you click on play button, maintain capsule with RVOCntroller+AIPath+… selected and see that RVOController disable Enable Rotation automatically. When it happening, check Enable Rotation manually and see what will happen. Then you can make an script to maintain it enabled.

Thank you! I’m not sure if that was mentioned anywhere in the API but that was the solution to it. Thanks a bunch!

It seems to me that it is a problem to be solutioned by developer in future version. I’m happy that i can helped you. Good bye.

I definitely celebrated a little too soon. The rotation did help, except I’m still getting bad local avoidance functionality. I’ve made 2 more videos to illustrate my situation.

The first video will (as you’ll notice), demonstrates my frustration:

First Video (with annotations)

This second video kind of goes through what I have set my settings to a bit slower:

I hope I can get some light shed on this. It is quite frustrating.

if do you want avoid some nodes on the grid i think that you would may use GraphUpdateScene, instead of the RVOController. The GraphUpdateScene does erase the Grid Graph nodes who is in into the created collision by him, and you don’t need use object with RVOController.
See it: http://www.youtube.com/watch?v=dClgmO9pfWg&list=UUGFisjWwbaA5JZXDOoOMjJg

I think I do require the RVOController.

Currently I just have a basic scene setup trying to get local avoidance to work with pathing. Ultimately, I want to create an RPG (think Diablo/Torchlight), so there will be many agents in my scene, and they will need to avoid eachother and obstacles to get to the player. Not only that, but I will be dynamically creating agents in my scene so those will also have to be avoided.

As far as I understand from looking into the API, RVOController + AIPath is the route I should be taking. I can look further into GraphUpdateScene, but as far as I can see (unless I’m still wrong), that may not be the solution to my problem.

Edit: took a look at the GraphUpdateScene component and that will not be a proper solution to my situation.

You could try increasing node size value. Don’t forget to change Pick Next Waypoint Dist in AIPath.

You were right actually, GraphUpdateScene was the answer to my problem. Basically update the nodes around my agents that are not moving. Thanks again.