RVO weird behavior

Hi

Do you think you could post your movement script and RVOController settings?
Also which version of the package are you using?

It should be 4.1.10, according to changelog, I downloaded it today or yesterday.

I believe settings were same as in RVO 2D example or very similar. Changed it several times so I dont remember but the behavior is still same.

Do you want me to post my current settings?

Yes. Posting your current settings would be nice.

I tried to tinker with all the settings and it seems the behavior is still same. From left to right, it tries to avoid, from right to left, it come through directly (half of each yellow circle overlaps).

My code is simple, I just call StartPath:
owner.seeker.StartPath(owner.transform.position,owner.moveTarget);

All the settings on image are on actor except RVO simulator, which is on some random object in scene (yes, there is only one copy of it). Enlarge the image since preview shows only half of it.

Thanks for fast support anyways!

So do you know what is happening? :slight_smile:

Hi

One thing. If you are using the AIPath script you shouldn’t use seeker.StartPath. That’s mostly for when you are writing your own movement script. Use AIPath.destination = someValue instead.
See https://arongranberg.com/astar/docs/aipath.html#destination

Can you replicate this in the example scene?

I found out that it must be the script I am using because I was not able to simulate that in example scene and moreover, if I use AIDestinationSetter, it works.

1 Like

After like 6 hours of debugging, I finally found out what is happening. My script flips the character when walking opposite way, multiplaying the X scale of master container by -1. That is, why the problem happened only when walking from right side to the left.

Can you help me fix it?

Hi

Ah. Well, I’d suggest putting your graphics on a child object which you flip instead.

No other way? Will be lot of work.

Hi

In the RVOController.cs script you could change the line

rvoAgent.Radius = Mathf.Max(0.001f, radius * scale.x);

to

rvoAgent.Radius = Mathf.Max(0.001f, radius * Mathf.Abs(scale.x));