How to avoid agent jitter

458 views
Skip to first unread message

Joey

unread,
Sep 17, 2012, 12:33:37 AM9/17/12
to recastnavigation
Hi, Mikko, How to set proper parameters to avoid agent jitter?
Now I'm using the default dtObstacleAvoidanceParams
params->velBias = 0.4f;
params->weightDesVel = 2.0f;
params->weightCurVel = 0.75f;
params->weightSide = 0.75f;
params->weightToi = 2.5f;
params->horizTime = 2.5f;
params->gridSize = 33;
params->adaptiveDivs = 7;
params->adaptiveRings = 2;
params->adaptiveDepth = 5;
dtCrowdAgent::vel as agent rotation.

And I tried this:
const float speedNorm = dtSqrt(dtVdot2D(dvel,dvel) * m_invVmax;
const float spen = m_params.weightSide * side * dtSqr(speedNorm);
it doesn't work.

I found your cane project, there is a parameter "m_maxTurn", adjust
this parameter the jitter getting better.
Add this parameter to dtCrowd, is there any problem? Thanks!

Mikko Mononen

unread,
Sep 18, 2012, 2:49:29 AM9/18/12
to recastna...@googlegroups.com
Hi,
The sampled velocity obstacle will always have some jitter, as the
velocity is chosen from one of the samples. The more samples you have,
the less jitter. I have deliberately avoided to add too many
parameters for the agent as most games have their own limitations and
there is no one size fits all.

Max turn helps jitter, but can reduce the agility of the agent to the
point that it will run in circles.

In what kind of scenarios you're seeing the jitter? I know that the
end of the path is especially nasty.


--mikko

Joey

unread,
Sep 18, 2012, 10:32:46 PM9/18/12
to recastnavigation
This situations can see jitter:
1. Two crowd units cross into each other.
2. Moving units cross stationary units.
3. Choke point

Joey

unread,
Sep 27, 2012, 2:11:06 AM9/27/12
to recastnavigation
If the target point in collision segment, the agent will jitter,
Take a look at this picture, the black tail is not straight when near
the target.
http://postimage.org/image/t2fpurdzz/


On 9月18日, 下午2时49分, Mikko Mononen <memono...@gmail.com> wrote:

Mikko Mononen

unread,
Oct 1, 2012, 9:53:48 AM10/1/12
to recastna...@googlegroups.com
Hi,

Sorry for the late reply, I've been moving the past week.

Approaching head on to a wall is nasty case for the sampling method I
use. I think I'll add another geometry based method for collision
avoidance. It'll be a bit slower, but at least it would allow you to
choose quality. I will be really busy this fall, so I cannot promise
any ETA for that.

--mikko

Joey

unread,
Oct 4, 2012, 7:22:44 AM10/4/12
to recastnavigation
Is ORCA method good for that? I'm still looking for good solutions to
handle jitter and stationary agent situation.
Now I'm experimenting on opensteer to make a StarCraft2 like movement.

On 10月1日, 下午9时53分, Mikko Mononen <memono...@gmail.com> wrote:
> Hi,
>

Mikko Mononen

unread,
Oct 4, 2012, 7:52:19 AM10/4/12
to recastna...@googlegroups.com
I have not gotten ORCA to work correctly. There are some relatively
simple corner cases which just don't make sense. I have had better
luck with Clear Path. That is the source code I'm planning to release.
If most of your agents are moving in the same direction, then
something simple should work. Steering behaviors have problems with
approaching end of the path too.

@MatthewEndsley did path finding for AirMech, it looks pretty good:
http://www.youtube.com/watch?v=1gSGqgSMp9k
I'm not completelly sure how much of dtCrowd they used (if at all),
but it looks great!


--mikko

Joey

unread,
Oct 8, 2012, 12:05:51 AM10/8/12
to recastnavigation
I'm looking forward to your ClearPath integration.
Yes, i use the same method as MatthewEndley, rasterize stationary
agent into navmesh.
Reply all
Reply to author
Forward
0 new messages