samiscoolco / sam0sRpgGame

A cool game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have NPC follow Player without overlap

djkool opened this issue · comments

Implement a way for an NPC to follow the Player without overlapping of sprites.

Goals:

  • NPC moves towards Player after they reach a certain distance
  • NPC does not overlap Player and stays a certain distance away
  • NPC still continues to look towards Player while following
  • NPC must animate while following.

Bonus:

  • NPC moves away if Player moves towards NPC
  • Have MIN and MAX follow distance to make movement look more flexible.