A* Pathfinding Project

Impacting movement during enemy pathfinding?


#1

Trying to make it so enemies that are shot are slightly knocked back. The script for that works just fine, but it seems that the pathfinding is overriding results of the knockback and no real effects are really seen. How might I squeeze the knockback feature into the AIPath script?

Thanks!

Edit: Nevermind. Simply modifying the canMove variable as needed seemed to get the job done.


#2

Hi

You could also use the AIPath.Move method to apply the knockback movement. That will work best I think. Disabling canMove will also work, but it will not interact as well with local avoidance and other things if you are using that.