How to get NPC to follow you from a short distance?
Noob question, but I want a man (Man_Business) to follow me from a short distance, keeping within that distance but never getting too close. Any help please, I have nothing.
Answer by Aggerwal · Jun 26, 2016 at 09:43 PM
You could just keep checking the distance between the two, it would be best if you set what max and min distance are and just do some if statements based on the distance of the two. If he gets to close, he stops moving, if he starts getting far, he moves again toward the player. This is probably best put in update of the business man.
Your answer
Follow this Question
Related Questions
Sound Game (wave) 0 Answers
2D Object following the cursor without glitchyness at the center 0 Answers
How to determine angle degrees distance of one object from another? 1 Answer
Unexpected Vector2.Distance results 0 Answers
Get Score distance! Help! 1 Answer