A* Pathfinding Project

RVO snaky move a bug or feature?


#1

Hey Aron!

I’m trying to figure out what actually happening here
Snaky vid sample

I’ve updated to your last betta version and was trying to use RVO + AIPath + FunnelModifire.

Looks like it’s shaking if angle around 90 degrees

Path I’m creating like that

pathCurrent = ABPath.Construct(AIPath.position, destination, null);
Seeker.StartPath(pathCurrent);

Everything working ok without RVO

Oh, and I have rigidbody on the characters, could it be a problem?

I’m a bit stuck here :thinking:


#2

Hi

It looks like your ‘pick next waypoint distance’ for the AIPath script might be too low.
See https://arongranberg.com/astar/docs/aipath.html#pickNextWaypointDist

You might want to use RichAI if you are using a recast/navmesh graph.


#3

Oh, yep, you were right . Can’t believe that it was so easy :joy:

thank you!

I was avoiding RichAI, thought it would be harder for CPU in rts with many units, but I noticed that you are actually always recommending if someone doing RTS, feel like I have to do the same, because I’m already using modifiers and RVO and navmesh


#4

Hi Aron,
One more about RichAI,

I did for AIPath some path builder for shift+move commands ,
and used for RichAI, but looks like it’s trying to skip the path, and get to exact destination.
and ignore addition path’s parts at all.

path builder

Trying to figure out how to play all path, and another fact
if I’m using StartPath(pathCurrent);
it didn’t read last point as end of the path,
but if I play SearchPath() it plays like end of the path


#5

Hi

Exactly are you handling shift + move?
I’d recommend using ai.reachedDestination and move to the next waypoint only when that is true.


#6

It was something with stop start speed, but I read here that it can be fixed, just forgot how ), but I have one animation that is playing when agent has started a path and reached the end of the path, I did shift+patrol, shift+move, shift+agressiveMove, shift+follow, shift+focusfire, shift+energycast and others that I can mix while building one path by clicking shortcuts and added some commands that can play while agent is moving like switch attack mode, or hit or dodge or block movement without path calculating, it just switched to root animations and then it backs to the calculated path

yeah, I think that the main problem was solving start/end events and something with root motions, can’t even remember, but here is an example

one archer running circles via shift move command while others are attacking.

since then I thought that building path separately from the units commands is better idea, I can build for example one path for all selected units, just have noticed that ))

is RichAI gonna be faster for RTS than AIPath?


#7

They have about the same same performance.