Closed
Description
When the distance between two positions are zero we get a ZeroDivisionError
.
File "D:\Documents\project\HorrorGame\ghost.py", line 33, in can_see_player
return arcade.has_line_of_sight(self.position, player.position, walls, 200, 5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documents\project\HorrorGame\Lib\site-packages\arcade\paths.py", line 357, in has_line_of_sight
u = step_distance / distance
~~~~~~~~~~~~~~^~~~~~~~~~
ZeroDivisionError: float division by zero