Enemy-DrawLine

Unity Version: 2021.3.17f1

Task

  1. Created a square room with top angle view in 2d. Place the thief in the center of the room.
  2. 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.
  3. For better understanding see this. Thief is represented by a green color gameobject. While cops are represented by red colored gameobjects.
  4. Displayed best possible direction in which the thief should run so that he has maximum chances of reaching the boundary of the room.
  5. And finally displayed the direction using a line renderer or any other graphical component in Unity.

Output Images

Image Description Output2 Output3