More realistic agent movement possible?

118 views
Skip to first unread message

J D

unread,
Apr 20, 2020, 7:18:02 AM4/20/20
to recastnavigation
Right now, agents all move in a straight line and using the shortest path possible.

However, that's not really how realistic movement works. 
If you think cars, for example, there is a limit to how quickly they can turn, decelerate, etc.

Is car-like movement anyhow possible with detour as it is?
Basically moving around corners not in zig-zag movements, but more along curves?

Niello

unread,
May 8, 2020, 10:55:48 AM5/8/20
to recastnavigation
RecastDemo includes a smooth steering. See "Anticipate turns" option in a "Create Crowds" tool.

2020-05-08_16-54-47.png


J D

unread,
May 8, 2020, 11:30:22 AM5/8/20
to recastnavigation
Hey,

thanks for the answer.

I am aware of this option, and use it in my own project as well.
But in practice, there is little to no difference between an agent with and without that "anticipate turns" parameter set. That can also be seen in the demo. Quite frankly, I'm not even sure it works at all.
They are still very much able to rotate way more quickly than what would be realistic for something like cars or even humans.

What would really be needed would be a limitation of how quickly an agent can rotate in a given amount of time or range.
Message has been deleted

Niello

unread,
May 10, 2020, 5:45:22 AM5/10/20
to recastnavigation
Don't know if it is planned for Detour, but I have that functionality in my steering implementation.
You may take a look if you want:
It also supports short steps (short enough not to turn in the movement direction) and big turns (big enough to stop moving to perform it).

пятница, 8 мая 2020 г., 17:30:22 UTC+2 пользователь J D написал:

J D

unread,
May 10, 2020, 8:59:10 AM5/10/20
to recastnavigation
I'm afraid something along those lines is what I'll have to implement as well.
However, this is really something that should be implemented inside of Detour, as implementing it on top would force me to implement some awkward synchronization step between Detour's agents and whatever sits on top.
It would probably be a lot easier to fork Detour and add the feature (agent property maxAnglePerUnit, make sure agents cannot turn faster than that, done) - but then I'd have to maintain my own fork and I am very adamant about cutting down on additional maintenance I have to do for a project.
I don't really like either option, but I might end up doing one of them when I get back to working on pathfinding ;)
Reply all
Reply to author
Forward
0 new messages