How to create bots walking in scene randomly?

I am working on 3d exhibition simulation and now I wanna add crowd and people are walking in hall randomly on ground (which is always gonna be rectangular) and not passing through each other, how can I do this? is there any example available on internet for such a case?

There are many ways to do this. One variant is to define walkable areas.

Circular control used for walkable areas control

AreaControl

2 Likes

gpgpu should be the best choice for crowd:

https://threejs.org/examples/?q=gpgpu#webgl_gpgpu_birds

https://threejs.org/examples/?q=gpgpu#webgl_gpgpu_birds_gltf

Second consider cpu loop for simple and easy to use. Hand-write distance-check or use some libs ( I think these two based on cpu loop? ):

https://schteppe.github.io/cannon.js/demos/sph.html

http://caza.la/synaptic/

Both gpu and cpu can use noise map to get random and continuous orientation. And if well designed, they should not cross:

More related:

2 Likes

I’ll check all of them and see which one I can use and understand, its a lot of information, really thank you!

1 Like