Weirdly behaving ai script.
So my script works as intendet for most part. When i set up atack distance to 3 it works, fun part begins when its lower (1.5 or 2) for some reason enemy after attacking reajusting himself and player is out of his reach and he is not willing to come closer. On 1.7 atack distance enemy started to wiggle aroud player while damaging him. I dont rember setting up and collision interactions that may cause it.
I am doing this project in collaboration with friend, and this script have diffrent problems on his side. 46 line of code is completly ignored by unity and while attack distance 3 is working just fine, setting it to lower is completly killing damage part of script off. When on my side if i come closer to enemy is damaging me again, on his enemy just follows him as pacifist.
Your answer
Follow this Question
Related Questions
Why can I only move upwards? 1 Answer
Flying ship AI 0 Answers
Adding prefab objects to a list on another script and object? 2 Answers