Ive beaten it
I may have cheated a little bit with the console log function to know when I’m outside of the viewpoint to know my coordinates and the enemy’s coordinates