Overshoot back n forth

Hi, so i’m having this issue when moving in corners. It’s sometimes going back n forth when passing through a corner
I’m debuggling towards steeringTarget, and it seems to be overshooting.
What’s more, everytime it “passed”, the steeringTarget changes to the nearest vertice

Maybe the distance tolerance can be increased, but not sure which one it is. It’s definitely not endReachedDistance bcoz i’ve tried to be 0.1, 0.5, even 2, and no difference

E: Using RichAi, with or without funnelsimplification, with custom character controller. So this issue probably wont happen in default setup

Cheers

Hi

Yeah it looks like it aims for that small edge in the navmesh, but due to the character controller beeing so speedy it misses it, so it needs to go back. It would detect that there is a faster path if it would recalculate its path. When it steps of the path like that it just uses a very simple path repair algorithm to bring it back.

You may have better luck with the AIPath movement script should shouldn’t run into this kind of issue.

Yea it is about it being too fast
I wanna do some kind of overshooting case handling in RichAI.TraverseFunnel

float dot = Vector3.Dot(velocity, dir);
if (distanceToSteeringTarget <= endReachedDistance || dot < 0)
NextPart();

But apparently it’s inside

if (approachingPartEndpoint)

And i couldn’t find any more NextPart that i could put this in that is not for EndPoint
Can u show me where else i can put this?

I forgot why i’m using RichAI (an even overrode it for a few reasons), but the docs on RichAI has no explanation what it’s for, compared to AIPath?

If i can fix the overshoot problem, what’s the benefit of RichAI over AIPath?

You can find a comparison here: https://arongranberg.com/astar/docs/movementscripts.html

Hi

In AIPath.OnPathComplete

It says

ABPath p = newPath as ABPath;
if (p == null) throw new System.Exception(“This function only handles ABPaths, do not use special path types”);

Is this true? RichAI doesn’t seem to have this limitation, and i really need the other path type
Is there a workaround? Or, why is it so?

If it still works and only the callback can’t handle other path type, then i guess it’s ok. I just need to use the callback for other thing, but would still need to use the incoming Path parameter
Edit: nevermind. ABPath is the base for various path, so it’s completely fine

Edit2:
I do notice 1 behavior tho:
If slowDownDistance is lower than pickNextWaypointDist, then everytime the chara starts pathfinding to the opposite direction, velocity2D is not 0 at first, but has a “lingering” forward value from previous pathfind

This makes the chara to always step forward (opposite direction from the latest issued target) for a few frames before turning around
Now i have to set slowDownDistance the same or more than pickNextWaypointDist, but i’d like to change this around for different uses…