4.0.0 RVOController + AIPath does not follow vertical coordinates

This post is a follow up of Splitting scanning into multiple frames?

First of all, I’ve read RVO Controller not walking stairs, but my heights are correctly set.

When using AIPath + RVOController to drive a character in the latest version, the character does not move vertically to follow the terrain shape (neither up nor down, and does not even try to settle into graph height at intialization.

The graph is scanned correctly, the path is generated correctly (sticking to the right Y positions), but the agent ignores all that and is stuck at its initial Y position.

Demonstration:

Same thing, from Scene view:

Agent configuration:

Pathfinder configuration:

The exact same setup, but with CharacterController, works as expected, so my main suspicion is on AIPath's handling of RVOController. From what I can gather from the code, it seems to project everything to the movement plane and do its calculations from there. Specifically, the line

var rvoTarget = currentPosition + movementPlane.ToWorld(Vector2.ClampMagnitude(velocity2D, distanceToEnd), 0f);

looks like is what causes this behaviour (currentPosition.y would always be the same, and the Y coord of the delta seems to be constant), but so far I haven’t found a solution for this.

Hi

I just uploaded version 4.0.1. I have added a gravity field to the AIPath component.
In 3.8.x the RVOController had some sort of gravity built in which is likely what you were using before.

Note that in 4.x you can use both an RVOController and a CharacterController, they are not mutually exclusive anymore.

Also. It looks like your graphs are not being rendered correctly, but it is a bit hard to see in the video. Do you think you could post a high resolution screenshot of the graph? (after you have upgraded to 4.0.1 if you are going to do that).

1 Like

Ah! That makes perfect sense, as always.

I’m sure you’re already working on it, but you might want to update the documentation for 4.x, it still says RVOController is a replacement for the default controller.

I tried uploading a screenshot but it kept timing out.

Where does it say that?
Here is the 4.0.1 documentation page for the RVOController: https://www.arongranberg.com/astar/documentation/dev_4_0_1_fad9187/class_pathfinding_1_1_r_v_o_1_1_r_v_o_controller.php
The docs at https://www.arongranberg.com/astar/docs are currently 3.8.x as 4.0 is still a release candidate.

Hm… that’s odd. Try uploading it to some online image sharing service.

Oh, the Documentation button in 4.0(.1) is pointing to the 3.8 branch. (/astar/docs, instead of /astar/documentation/dev...) Silly me. :confused:

Got it up on imgur, looks perfectly fine to me (ignore abstract geography, this is mainly a test for layered graphs).


A very minor feedback on the new gizmos (which are awesome, by the way) is that Seeker's path gizmos are partially occluded by the graph grid gizmo on irregular elevations. e.g.

It’s just that it doesn’t look like all connections from each node are drawn, but it could just be that they are hidden below the terrain. Do you think you could verify for me if all 8 connections for each node are drawn?

Good catch. Needed to fix a file on my server. It should correct itself within a day when it next checks for an update.

1 Like

I believe you mean 4 connections, right? This is a layered grid graph, not a regular one. And yes, apart from the fact that some connections are under the ground, all connections are rendered.

1 Like

Right. Ok. Everything is as it should be then.

Hello Aron,
I am using 3.8. beta, pro licencse since 21.3. 2016.
I was using AI path or Lerp, but
one is not following terrain but can use rvo.
second is following terrain, but cant work with rvo.
waiting for fix several months/year :slight_smile: , doing silly fixes in meantime…
IS version 4.0.x solving that?
Any update on when upgrade can be done? Still not on asset store, and its being critical now for us.
Nice timing with v4 :slight_smile:
I can send you invoice nr. if it can help somehow.

Thanks a lot, its great package!

Hi

AIPath can use RVO and follow the terrain (that should work even in 3.8 with the proper configuration).
AILerp will only interpolate along the calculated path, which makes it impossible to use with any kind of local avoidance.

I’m still waiting. Unfortunately new packages or major updates can take longer to review.
Since it is not even possible to upgrade yet, I have sent you a PM with a license key that is valid for 1 week which you can use in the meantime.

thanks a lot,
great service.

Not sure what was wrong in my 3.8.x setup, I am pretty sure it wasnt possible with OOTB scripts.
It was with Grid type.
No prob, I will jump on v 4.0 and let you know, today / tomorow.

1 Like

ok in v4.0, AIPath works now correctly with RVO, thanks.
now I have to check how avoid turning around, while several units are fighitng for same tile / location.
I think I can find it on forum, I hope some v 4.0.x specific topic.

Depending on your game, it might make more sense to move their target points so that they do not overlap.
For example in an RTS-like game there might be some melee units surrounding an enemy unit. Instead of them all trying to move to the enemy unit’s location the enemy unit can have say 6 or 8 points around it positioned on a circle that the attacking units can reserve and then move to. That will spread the units out nicely around the target unit and will reduce weird movement.

good idea with multiple points, its similar to RTS indeed. lots of units in big grid graph.
even if i send jut one unit,no collision, its still running rvo, turning around, while not moving.
can you pls help with that? I can find some dirty solution, but I prefer clean and performant option. thanks.
I checked some examples in package, but thi s not solved there, or I cant find it.
thank you

i have found i stop it with bool canMove, or isLocked. but its dirty, because onReachTarget is still repeating (log msg there).
so i have to start with that right?

Do you have any hint please?

@lopo which version are you using?

hi, its version 4.0.6

I don’t exactly understand what you are trying to say here. Would it be possible to share a video of the issue?

Hi, ok I will rephrase. cant do video right now.
using 4.0.6 AIPath with RVO.
When i send just one unit/character to the position, it stops at the destination, but still turning/rotating, on same place, no real movement.

If I exclude RVO, its OK.
I have checked RVO example,and its same situation there I think, your small units never really stop.

in onPathcomplete, i am changing bool canMove, and isLocked, lock when not moving is disabled.
->this optically works, stops turning, but i think its dirty solution, I should prevent asking unit to move, not disabling the “ability/condition” to move.

Thanks