Possible to pause recastJS crowd navigation?

Hi, can the recastJS crowd navigation be paused (with for example the press of a button)?
For my use case, I need to pause the movement of agents but still need to be able to control the camera and other functions.

I tried a bit with the crowd navigation demo (https://playground.babylonjs.com/#X5XCVT#240) but couldn’t find out how to do this.

@Cedric is the brillant mind behind the integration but he is in vacation at the moment. He should be back in a couple weeks so you might need a bit of patience for the answer.

Ok, thank you for letting me know. I’ll have to wait a bit then :slight_smile:

1 Like

Hi @Censor

There is no API to pause the recast update. I can do something this week. I’ll let you know when the PR is done.

That would be great, thanks!

1 Like

is this? case you thought

click and “s” press

The next thing you need to do is save click point and retry goto this point

Hi, thanks for the suggestion and playground.
It’s close for what I need but I’m looking for a complete pause of the crowd movement.

When the pause resumes, each agent’s movement to their destinations should just continue as before. By teleporting and then resetting the agent’s destination, the velocity of the agent is also reset unfortunately…

If it is meant to feel the difference in speed, how about temporarily raising “agentParams.maxAcceleratio = 4.0 - > 20.0” and applying it?
by using updateAgentParameters.
If you don’t give a lot of change factors to agents, I’m guessing they’ll have a similar enough path.

PR Time Factor for crowd agents update by CedricGuillemet · Pull Request #12934 · BabylonJS/Babylon.js · GitHub


Thanks both, @Cedric cool, that slow-down feature you’ve added I can use as well!

1 Like