recast+detour+detourcrowd+bullet usage

391 views
Skip to first unread message

ステパヌシキンドミトリ

unread,
Sep 3, 2014, 2:45:18 AM9/3/14
to recastna...@googlegroups.com
Hi, Mikko!

Im trying to embed Detour,DetourCrowd to my app instead other path finding solution.
My requirement is to make smooth character movement on map.

I'm creating navigation mesh for Detour+DetourCrowd from collision data, because navigation mesh I used before is not exactly the same as collision, so using its data with bullet, and characters fall down here and there and then suddenly appear.

There is a leader character and a number of followers.
I implemented leader movement using bullet character controller, because it's good enough.
Tried the same with followers, then because there are walls and corners and some places when only one character at time may pass, so finally I got stuck characters, movement looks bad. So I decided to try DetourCrowd.

Finally it works much better than before(thanks a lot for implementing such a great thing!),
but I still have some questions.

1. There are some maps in our game which have stairs. And sometimes character must jump down, not walk on stairs. Is it possible to implement it using Detour?

2. Followers must follow leader character with the same average speed and acceleration. Well, set the same parameters and its done. Now imagine, that followers have different size. We have leader radius, and followers radiuses, all different. The big ones probably should start walk slower, stop slower as well, than smaller ones.
Also when leader stops, followers arriving to destination. How can I make them stop not directly near leader, but on (leader radius)+(some distance)+(follower radius)? Can I do it automatically using Detour?

3. When using Detour we must specify some parameters, such as speed, acceleration. Now I using it with bullet physics world. Are units for Detour the same as for bullet. For example I specify speed=5.0f in Detour, will actual speed be the same as in bullet simulation?

Sorry for noob questions, but please help where possible.

ステパヌシキンドミトリ

unread,
Sep 3, 2014, 5:58:16 AM9/3/14
to recastna...@googlegroups.com
4. On arriving target I need to adjust character stop force. I want apply additional brake force but cant found any method in DetourCrowd for it.

Mikko Mononen

unread,
Sep 3, 2014, 6:16:39 AM9/3/14
to recastna...@googlegroups.com
Hi,

1) You can add off-mesh links on locations where the agents can jump down or over places which do not have navmesh build on them. You need to do this annotation manually.

2) You can use the dtCrowdAgentParams to set the speed and acceleration of each character. There is no built-in way to handle stopping at a certain distance. You can use resetMoveTarget() to make the agents stop when certain condition is reached.

3) Mixing navigation and physics is really tricky. You have two system fighting over each other. You should decide which one is the primary one, and then try to cope with that. Here's my thoughts on the topic: http://digestingduck.blogspot.fi/2010/09/on-navigation-robustness.html
The simulation in Detour may not be as good/accurate as Bullet, but if you use same units in both systems, they should be close.

4) Unfortunately the API is not flexible enough to support this. Let me know if you need help to find a place where to that to DetourCrowd.


--mikko


On Wed, Sep 3, 2014 at 12:58 PM, ステパヌシキンドミトリ <angel...@gmail.com> wrote:
4. On arriving target I need to adjust character stop force. I want apply additional brake force but cant found any method in DetourCrowd for it.

--

---
You received this message because you are subscribed to the Google Groups "recastnavigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recastnavigati...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ステパヌシキンドミトリ

unread,
Sep 3, 2014, 6:37:18 AM9/3/14
to recastna...@googlegroups.com
That was fast and very helpful. Thank You!

[offtop]I was told before to implement opensteer plugin+mcropather+bullet and make it work nice for task above.
Now I know how stupid was that order :).[/offtop]
Reply all
Reply to author
Forward
0 new messages