Talk:Enemy AI That Follows The Character Done Right/@comment-5334617-20150609214702/@comment-26338521-20150609223722



Woah woah I see what you are doing there and it is very profound, but see the thing is your code is a little less convenient as it adds the un-needed delta variables, my example processeses the deltas on the spot without need for new variables, it also takes up less space then your code while accomplishing the same results, but maybe the greatest flaw in your code is that once the enemDistance is less then zero we get a "divided by zero" problem, whereas with my example you don't get that error and arn't forced to do collision at that exact moment, but either way your example is just as a good example for enemy AI so I will add it to this page later, good to see there are others just as enthusiastc and invested into this community as me...