Pedestrian AI (like GTA)

I need help making pedestrians (for a GTA-style game) that will randomly spawn, walk around randomly within a certain area (making sure it sticks to sidewalks) and get knocked out on collision with a car (and/or bullets), utilizing ragdoll physics (basically, running them over with a car should feel like GTA IV). How do I do this?

This is a very complicated thing to achieve. try googling object avoidance or crowd AI.

1 Answer

1

randomly spawn

Asked a lot of times. Google it.

walk around randomly within a certain area (making sure it sticks to sidewalks)

Look at Unity’s AngryBot demo, there is a way to define a route/path. You can do some modification to it so it will generate a random path. I did this before, for a prototype of a TD game with multiple routes.

get knocked out on collision with a car (and/or bullets), utilizing ragdoll physics (basically, running them over with a car should feel like GTA IV).

Ragdoll? Never did this before. However, since ragdoll is very common in modern games, I am sure you can use Google find some example.