Unity Version:
2021.3.17f1
- Created a square room with top angle view in 2d. Place the thief in the center of the room.
- Now randomly instantiated 10 cops in the same room. No one should overlap each other and there should be required space between each person. Make sure each person is instantiated inside the room only.
- For better understanding see this. Thief is represented by a green color gameobject. While cops are represented by red colored gameobjects.
- Displayed best possible direction in which the thief should run so that he has maximum chances of reaching the boundary of the room.
- And finally displayed the direction using a line renderer or any other graphical component in Unity.