Calc direction vector based on destination vector and distance from enemy in AS3
- by Phil
I'm working on a zombie game in AS3 where I want a character to be able to move away from a zombie depending upon how close the zombie is. The character also has a destination that it's trying to get too on the screen.
Ok so I have 2 vectors, one pointing to my destination, and one pointing to the zombie which I then invert to get my "away"…