NPCs random movement

Hi,

I want to create a city with some NPCs walking around between the buildings.

How can I create a random movement for the NPCs?

Thanks

You might want to look into pathfinding solutions. There are already a number of answers on this site which discuss various pathfinding implementations, such as this one:

AI Programming Resources

If you have more specific questions that are particular to your implementation, come back and ask!

A simple approach would be:

  • Create either a waypoint network or a navmesh for your scene with Angry Ant's Path
  • Pick a random point to move to
  • Obtain a path to that point
  • Use UnitySteer's PathFollower to move to it, as described on this answer